Data Structures | |
| struct | cuooP_hcobj |
Defines | |
| #define | CUOO_HC_GENERATION 0 |
| #define | CUOO_HCOBJ_NEEDED 1 |
| #define | CUOO_HCOBJ CUOO_OBJ cu_inherit (cuooP_hcobj); |
| #define | CUOO_HCOBJ_SHIFT sizeof(struct cuooP_hcobj) |
| #define | CUOO_HCOBJ_INIT CUOO_OBJ_INIT { 0 }, |
| #define | CUOO_HCOBJ_SHIFTW (CUOO_HCOBJ_SHIFT/CU_WORD_SIZE) |
| #define | CUOO_HCOBJ_KEY(obj) ((void *)((char *)(obj) + CUOO_HCOBJ_SHIFT)) |
Typedefs | |
| typedef struct cuooP_hcobj * | cuooP_hcobj_t |
This header defines a macro CUOO_HCOBJ to put right after the opening brace of a hash-consed object struct:
struct my_obj { CUOO_HCOBJ // key fields // value fields };
Note that there is no semicolon after the macro. A macro is used here, because the need for the header depends on the configuration.
| #define CUOO_HCOBJ CUOO_OBJ cu_inherit (cuooP_hcobj); |
Put this, without semicolon, at the beginning of struct bodies which are used for hash-consed objects.
| #define CUOO_HCOBJ_SHIFT sizeof(struct cuooP_hcobj) |
The offset of the key-part of hash-consed object struct.
Referenced by cudyn_to_bool(), cuex_opn_by_arr(), cuoo_halloc(), cuoo_hxalloc_clear(), cuoo_hxalloc_init(), and cuoo_hxalloc_setao().