Implement OBLISTs
[muddle-interpreter.git] / src / atom.h
index 5b71ad3441822f6c11e8d0842d66b22a42895639..787fece4f5c5bbfd3e47a76a0ad3113fed27a3ce 100644 (file)
@@ -21,14 +21,21 @@ License along with this file. If not, see
 
 #include "object.h"
 
-typedef struct
+typedef struct atom_body atom_body;
+
+// Return an atom with a newly-allocated body.
+atom_object atom_create (const char *name, uint32_t namelen);
+
+atom_body *ATOM_BODY (heap_ptr p);
+
+const char *atom_pname (atom_object o);
+
+inline static uint32_t
+atom_namelen (atom_object body)
 {
-  evaltype type;               // UNBOUND/LOCI
-  // bindid
-  // value ptr
-  // oblist ptr
-  // type ptr
-  const char pname[];
-} atom_body;
+  return body.val.namelen;
+}
+
+heap_ptr atom_body_alloc (uint32_t ct);
 
 #endif