Fix bug with merge2 and ,@, add (let)
diff --git a/src/lisp/lisp.h b/src/lisp/lisp.h
index ad7314a..c5cb398 100644
--- a/src/lisp/lisp.h
+++ b/src/lisp/lisp.h
@@ -83,6 +83,18 @@
value_t data[];
};
+struct class
+{
+ // A symbol representing the name of the class this is an instance
+ // of.
+ value_t type;
+
+ int num_members;
+ // C data
+ void *cdata;
+ value_t members[];
+};
+
/// Default pool (no pool)
#define NO_POOL 0
@@ -131,6 +143,12 @@
struct closure closure;
};
+struct class_alloc
+{
+ struct alloc alloc;
+ struct class class;
+};
+
/**
* Create a new allocation pool.
*/
@@ -181,7 +199,7 @@
value_t cdr(value_t v);
/// Return a pointer to the "nil" tail of the list, or NULL if you do
/// something stupid.
-value_t *nilptr(value_t val);
+value_t *nilptr(value_t *val);
value_t *carref(value_t v);
value_t *cdrref(value_t v);
/// @returns the `index`-th `cdr`