Implement OBLISTs
[muddle-interpreter.git] / src / object.c
index a2a81a62e478134ddd188ec4188c0fbe9a2c869d..e64e68eb6001751eb320143a05dedfb93c81ff9a 100644 (file)
@@ -21,7 +21,7 @@ License along with this file. If not, see
 uint32_t
 list_length (const list_object * o)
 {
-  const pool_object *p = POOL_OBJECT (o->head);
+  const pool_object *p = POOL_OBJECT (o->val.head);
   uint32_t n = 0;
   while (p)
     {
@@ -64,3 +64,10 @@ static object rest(const object *lst) {
     return o;
 }
 */
+
+dope_object *
+uv_dope (const uvector_object * o)
+{
+  return (dope_object *) & HEAP_OBJECT (o->val.body)[(o->val.len + 1) / 2 +
+                                                    1];
+}