Overview
Comment: | Add cfw_is. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ffa5357d1b517f3b66b823eec94ccd1e |
User & Date: | js on 2012-04-22 14:03:42 |
Other Links: | manifest | tags |
Context
2012-04-22
| ||
14:10 | Add cfw_class. check-in: 106a4491c3 user: js tags: trunk | |
14:03 | Add cfw_is. check-in: ffa5357d1b user: js tags: trunk | |
13:19 | Let the iter point to the first object. check-in: d4d333ba7f user: js tags: trunk | |
Changes
Modified src/object.c from [3d2cb3ed1b] to [55e68373f9].
︙ | |||
114 115 116 117 118 119 120 121 122 123 124 125 126 127 | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | + + + + + + + + | CFWObject *obj = ptr; if (obj->cls->dtor != NULL) obj->cls->dtor(obj); free(obj); } bool cfw_is(void *ptr, CFWClass *cls) { CFWObject *obj = ptr; return (obj->cls == cls); } bool cfw_equal(void *ptr1, void *ptr2) { CFWObject *obj1 = ptr1, *obj2 = ptr2; if (obj1->cls->equal != NULL) { |
︙ |
Modified src/object.h from [07013e8446] to [b6d17265f1].
︙ | |||
36 37 38 39 40 41 42 43 44 45 46 47 | 36 37 38 39 40 41 42 43 44 45 46 47 48 | + | extern CFWClass *cfw_object; extern void* cfw_new(CFWClass*, ...); extern void* cfw_new_p(CFWClass*, ...); extern void* cfw_ref(void*); extern void cfw_unref(void*); extern void cfw_free(void*); extern bool cfw_is(void*, CFWClass*); extern bool cfw_equal(void*, void*); extern uint32_t cfw_hash(void*); extern void* cfw_copy(void*); #endif |