libyang  2.0.112
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dict.h
Go to the documentation of this file.
1 
15 #ifndef LY_DICT_H_
16 #define LY_DICT_H_
17 
18 #include <stddef.h>
19 #include <stdint.h>
20 #include <string.h>
21 
22 #include "log.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /* dummy context structure */
29 struct ly_ctx;
30 
81 LY_ERR lydict_insert(const struct ly_ctx *ctx, const char *value, size_t len, const char **str_p);
82 
100 LY_ERR lydict_insert_zc(const struct ly_ctx *ctx, char *value, const char **str_p);
101 
114 LY_ERR lydict_remove(const struct ly_ctx *ctx, const char *value);
115 
118 #ifdef __cplusplus
119 }
120 #endif
121 
122 #endif /* LY_DICT_H_ */
LY_ERR lydict_remove(const struct ly_ctx *ctx, const char *value)
Remove specified string from the dictionary. It decrement reference counter for the string and if it ...
LY_ERR lydict_insert(const struct ly_ctx *ctx, const char *value, size_t len, const char **str_p)
Insert string into dictionary. If the string is already present, only a reference counter is incremen...
LY_ERR lydict_insert_zc(const struct ly_ctx *ctx, char *value, const char **str_p)
Insert string into dictionary - zerocopy version. If the string is already present, only a reference counter is incremented and no memory allocation is performed. This insert function variant avoids duplication of specified value - it is inserted into the dictionary directly.
LY_ERR
libyang&#39;s error codes returned by the libyang functions.
Definition: log.h:245
Logger manipulation routines and error definitions.
libyang context handler.