Loading...
Searching...
No Matches
dict.h File Reference

libyang dictionary More...

`#include <stddef.h>`
`#include <stdint.h>`
`#include <string.h>`
`#include "log.h"`
Include dependency graph for dict.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions

LIBYANG_API_DECL LY_ERR | lydict_dup (const struct ly_ctx *ctx, const char *value, const char **str_p)
| Duplicate string in dictionary. Only a reference counter is incremented.
LIBYANG_API_DECL 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 incremented and no memory allocation is performed.
LIBYANG_API_DECL 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.
LIBYANG_API_DECL 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 is zero, the string itself is freed.

## Detailed Description

libyang dictionary

Author
  Radek Krejci rkrej.nosp@m.ci@c.nosp@m.esnet.nosp@m..cz

Copyright (c) 2015-2018 CESNET, z.s.p.o.

This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at

    https://opensource.org/licenses/BSD-3-Clause

Definition in file dict.h.