Implement OBLISTs
[muddle-interpreter.git] / src / alloc.c
index ad55630b7a0c8ddb75174c8d476a771b442c3ebe..356a038e9f8587311f17398029eefce1b3ffaaaa 100644 (file)
@@ -17,6 +17,7 @@ License along with this file. If not, see
 */
 
 #include "alloc.h"
+#include "atom.h"
 #include "object.h"
 
 extern pool_object *pool;
@@ -86,3 +87,17 @@ heap_copy_array_rev (const object * objs, uint32_t len)
     }
   return p;
 }
+
+uv_val *
+UV_VAL (heap_ptr p)
+{
+  assert (p > 0);
+  return (uv_val *) & vhp_base[p];
+}
+
+atom_body *
+ATOM_BODY (heap_ptr p)
+{
+  assert (p);
+  return (atom_body *) (&vhp_base[p]);
+}