typedef void* (*_add_elem)(shm_ds_t *ds, void *key, void *value, int size);
typedef void* (*_lookup)(shm_ds_t *ds, void *key);
typedef void (*_dump)(shm_ds_t *ds);
typedef int (*_compare)(void *key1, void *key2);
typedef struct shm_ds{
void *ds;
_add_elem shm_add_elem;
_lookup shm_lookup;
_dump dump;
_compare compare;
} shm_ds_t;
Its chicken and egg problem. I have defined some callback fn pointers which uses shm_ds_t
type, but this type is defined after callback definitions. Similarly, if i change the order, then it reports the same issue with callback definitions which shall be used before defined in this case. Can anyone pls suggest the soln of this ?