Closed lindsaywhitney closed 1 year ago
Hi,
You need to define it like this:
ARRAY_DEF(/* the array prefix */ array_data_node,
/* the object type */ data_node,
/* the object oplist */ (INIT(API_2(data_node_init)),
SET(API_6(data_node_set)),
REALLOC(API(data_node_realloc,NONE, ARG2, ARG3)),
INIT_SET(API_6(data_node_init_set)),
CLEAR(API_2(data_node_clear))))
More information:
Additional notes on this code which may be bugs:
How to define REALLOC in OPLIST? There is error in following code:
static data_node data_node_realloc(data_node obj, size_t size);
ARRAY_DEF(/ the array prefix / array_data_node, / the object type / data_node, / the object oplist / (INIT(API_2(data_node_init)), SET(API_6(data_node_set)), REALLOC(API(data_node_realloc,ARGPTR1,ARGPTR2,ARG3)), INIT_SET(API_6(data_node_init_set)), CLEAR(API_2(data_node_clear))))