64 #define WEED_LEAF_READONLY_PLUGIN (1<<0)
65 #define WEED_LEAF_READONLY_HOST (1<<1)
69 #define WEED_NO_ERROR 0
70 #define WEED_ERROR_MEMORY_ALLOCATION 1
71 #define WEED_ERROR_LEAF_READONLY 2
72 #define WEED_ERROR_NOSUCH_ELEMENT 3
73 #define WEED_ERROR_NOSUCH_LEAF 4
74 #define WEED_ERROR_WRONG_SEED_TYPE 5
78 #define WEED_SEED_INT 1
79 #define WEED_SEED_DOUBLE 2
80 #define WEED_SEED_BOOLEAN 3
81 #define WEED_SEED_STRING 4
82 #define WEED_SEED_INT64 5
85 #define WEED_SEED_VOIDPTR 65
86 #define WEED_SEED_PLANTPTR 66
89 typedef void *(*weed_malloc_f)(
size_t size);
91 typedef void *(*weed_memset_f)(
void *s,
int c,
size_t n);
92 typedef void *(*weed_memcpy_f)(
void *dest,
const void *src,
size_t n);
94 #ifndef HAVE_WEED_PLANT_T
95 #define HAVE_WEED_PLANT_T
125 typedef weed_plant_t *(*weed_plant_new_f)(
int plant_type);
126 typedef char **(*weed_plant_list_leaves_f)(weed_plant_t *plant);
127 typedef int (*
weed_leaf_set_f)(weed_plant_t *plant,
const char *key,
int seed_type,
int num_elems,
void *value);
128 typedef int (*
weed_leaf_get_f)(weed_plant_t *plant,
const char *key,
int idx,
void *value);
138 #endif // #ifndef __WEED_H__
int num_elements
Definition: weed.h:106
weed_data_t ** data
Definition: weed.h:107
int seed_type
Definition: weed.h:105
void(* weed_free_f)(void *ptr)
Definition: weed.h:90
int(* weed_leaf_set_f)(weed_plant_t *plant, const char *key, int seed_type, int num_elems, void *value)
Definition: weed.h:127
weed_size_t size
Definition: weed.h:113
weed_leaf_t * next
Definition: weed.h:109
int(* weed_leaf_num_elements_f)(weed_plant_t *plant, const char *key)
Definition: weed.h:129
int(* weed_leaf_get_flags_f)(weed_plant_t *plant, const char *key)
Definition: weed.h:132
size_t weed_size_t
Definition: weed.h:100
int(* weed_leaf_seed_type_f)(weed_plant_t *plant, const char *key)
Definition: weed.h:131
weed_leaf_t weed_plant_t
Definition: weed.h:99
int flags
Definition: weed.h:108
const char * key
Definition: weed.h:104
size_t(* weed_leaf_element_size_f)(weed_plant_t *plant, const char *key, int idx)
Definition: weed.h:130
int64_t weed_timecode_t
Definition: weed.h:119
int(* weed_leaf_get_f)(weed_plant_t *plant, const char *key, int idx, void *value)
Definition: weed.h:128
int(* weed_default_getter_f)(weed_plant_t *plant, const char *key, int idx, void *value)
Definition: weed.h:122
void * value
Definition: weed.h:114