Defines | |
#define | CUOO_HCOBJ |
#define | CUOO_HCOBJ_SHIFT 0 |
#define | CUOO_HCOBJ_INIT |
#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 if present ... };
Note that there is no semicolon after the macro. A macro is used here, because the need for this field depends on the configuration.
#define CUOO_HCOBJ |
Put this on the top of struct which define hash-consed objects, leaving out semicolon.
#define CUOO_HCOBJ_SHIFT 0 |
The offset of the key-part of a hash-consed object struct.