12 #define R_OBJECT_UNKNOWN 0
13 #define R_OBJECT_STRING 1
14 #define R_OBJECT_ARRAY 2
15 #define R_OBJECT_HARRAY 3
16 #define R_OBJECT_CARRAY 4
17 #define R_OBJECT_MAP 5
18 #define R_OBJECT_HASH 6
19 #define R_OBJECT_REF 7
20 #define R_OBJECT_JSOBJECT 8
22 #define R_OBJECT_USER 256
25 typedef struct robject_s robject_t;
27 * This should be renamed to cleanup
29 typedef void (*r_object_cleanupfun)(robject_t *ptr);
30 typedef robject_t* (*r_object_copyfun)(const robject_t *ptr);
37 r_object_cleanupfun cleanup;
38 r_object_copyfun copy;
41 robject_t *r_object_create(rsize_t size);
42 robject_t *r_object_copy(const robject_t *obj);
43 void r_object_destroy(robject_t *obj);
44 void r_object_cleanup(robject_t *obj);
45 void r_object_init(robject_t *obj, ruint32 type, r_object_cleanupfun cleanup, r_object_copyfun copy);
46 void r_object_typeset(robject_t *obj, ruint32 type);
47 ruint32 r_object_typeget(robject_t *obj);
52 robject_t *r_object_v_copy(const robject_t *obj);
53 void r_object_v_cleanup(robject_t *obj);