summaryrefslogtreecommitdiff
path: root/liblali.h
diff options
context:
space:
mode:
authorDaniel Cerqueira <dan.git@lispclub.com>2025-05-29 21:17:42 +0100
committerDaniel Cerqueira <dan.git@lispclub.com>2025-05-30 09:42:57 +0100
commit2b03b74037e5844c4bc05e9febda45e560a46f42 (patch)
treeb63a1da4a845f0428faaaf50c31d988d989765fb /liblali.h
parent4ca60176436134226d269a21e899a5fa3ae65e3d (diff)
newNumber() with string argument and continue making numbers neutral
- also update .gitignore
Diffstat (limited to 'liblali.h')
-rw-r--r--liblali.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/liblali.h b/liblali.h
index 9ffb63d..40b8859 100644
--- a/liblali.h
+++ b/liblali.h
@@ -70,8 +70,8 @@ struct Object {
Type type;
size_t size;
union {
- struct { double number; }; // number
- struct { char string[sizeof (Object *[3])]; }; // string, symbol
+ /* struct { double number; }; // number */
+ struct { char string[sizeof (Object *[3])]; }; // string, symbol, number
struct { Object *car, *cdr; }; // cons
struct { Object *params, *body, *env; }; // lambda, macro
struct { int primitive; char *name; }; // primitive
@@ -188,7 +188,8 @@ Object *newObject(Type type, GC_PARAM);
Object *newObjectFrom(Object **from, GC_PARAM);
-Object *newNumber(double number, GC_PARAM);
+//Object *newNumber(double number, GC_PARAM);
+Object *newNumber(char *string, GC_PARAM);
Object *newObjectWithString(Type type, size_t size, GC_PARAM);
@@ -255,6 +256,8 @@ Object *readList(Stream *stream, GC_PARAM);
// WRITING OBJECTS ////////////////////////////////////////////////////////////
+char *removeZeroPadding(char *string);
+
void writeObject(Object *object, bool readably, FILE *file);
// ENVIRONMENT ////////////////////////////////////////////////////////////////