libyang  1.0.184
YANG data modeling language library
dict.h
Go to the documentation of this file.
1 
15 #ifndef LY_DICT_H_
16 #define LY_DICT_H_
17 
18 #include <stdint.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /*
25  * structure definition from context.h
26  */
27 struct ly_ctx;
28 
50 const char *lydict_insert(struct ly_ctx *ctx, const char *value, size_t len);
51 
66 const char *lydict_insert_zc(struct ly_ctx *ctx, char *value);
67 
77 void lydict_remove(struct ly_ctx *ctx, const char *value);
78 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* LY_DICT_H_ */
lydict_remove
void lydict_remove(struct ly_ctx *ctx, const char *value)
Remove specified string from the dictionary. It decrement reference counter for the string and if it ...
lydict_insert
const char * lydict_insert(struct ly_ctx *ctx, const char *value, size_t len)
Insert string into dictionary. If the string is already present, only a reference counter is incremen...
lydict_insert_zc
const char * lydict_insert_zc(struct ly_ctx *ctx, char *value)
Insert string into dictionary - zerocopy version. If the string is already present,...