php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
bst_map.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Alexander Borisov
3 *
4 * Author: Alexander Borisov <borisov@lexbor.com>
5 */
6
7#ifndef LEXBOR_BST_MAP_H
8#define LEXBOR_BST_MAP_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#include "lexbor/core/bst.h"
15#include "lexbor/core/str.h"
16#include "lexbor/core/mraw.h"
17#include "lexbor/core/dobject.h"
18
19
20typedef struct {
22 void *value;
23}
25
33
34
37
40
41LXB_API void
43
45lexbor_bst_map_destroy(lexbor_bst_map_t *bst_map, bool self_destroy);
46
47
50 const lxb_char_t *key, size_t key_len);
51
54 const lxb_char_t *key, size_t key_len, void *value);
55
59 const lxb_char_t *key, size_t key_len);
60
61LXB_API void *
63 const lxb_char_t *key, size_t key_len);
64
65
66/*
67 * Inline functions
68 */
71{
72 return bst_map->mraw;
73}
74
75/*
76 * No inline functions for ABI.
77 */
80
81
82#ifdef __cplusplus
83} /* extern "C" */
84#endif
85
86#endif /* LEXBOR_BST_MAP_H */
87
struct lexbor_bst lexbor_bst_t
Definition bst.h:25
struct lexbor_bst_entry lexbor_bst_entry_t
Definition bst.h:24
LXB_API lxb_status_t lexbor_bst_map_init(lexbor_bst_map_t *bst_map, size_t size)
Definition bst_map.c:18
LXB_API lexbor_bst_map_t * lexbor_bst_map_create(void)
Definition bst_map.c:12
LXB_API lexbor_mraw_t * lexbor_bst_map_mraw_noi(lexbor_bst_map_t *bst_map)
Definition bst_map.c:235
LXB_API lexbor_bst_map_entry_t * lexbor_bst_map_search(lexbor_bst_map_t *bst_map, lexbor_bst_entry_t *scope, const lxb_char_t *key, size_t key_len)
Definition bst_map.c:82
LXB_API lexbor_bst_map_entry_t * lexbor_bst_map_insert_not_exists(lexbor_bst_map_t *bst_map, lexbor_bst_entry_t **scope, const lxb_char_t *key, size_t key_len)
Definition bst_map.c:129
LXB_API void lexbor_bst_map_clean(lexbor_bst_map_t *bst_map)
Definition bst_map.c:56
lxb_inline lexbor_mraw_t * lexbor_bst_map_mraw(lexbor_bst_map_t *bst_map)
Definition bst_map.h:70
LXB_API lexbor_bst_map_entry_t * lexbor_bst_map_insert(lexbor_bst_map_t *bst_map, lexbor_bst_entry_t **scope, const lxb_char_t *key, size_t key_len, void *value)
Definition bst_map.c:112
LXB_API void * lexbor_bst_map_remove(lexbor_bst_map_t *bst_map, lexbor_bst_entry_t **scope, const lxb_char_t *key, size_t key_len)
Definition bst_map.c:195
LXB_API lexbor_bst_map_t * lexbor_bst_map_destroy(lexbor_bst_map_t *bst_map, bool self_destroy)
Definition bst_map.c:64
#define LXB_API
Definition def.h:48
new_type size
Definition ffi.c:4365
unsigned char key[REFLECTION_KEY_LEN]
Definition bst_map.h:20
lexbor_str_t str
Definition bst_map.h:21
void * value
Definition bst_map.h:22
lexbor_mraw_t * mraw
Definition bst_map.h:28
lexbor_bst_t * bst
Definition bst_map.h:27
lexbor_dobject_t * entries
Definition bst_map.h:29
unsigned int lxb_status_t
Definition types.h:28
#define lxb_inline
Definition types.h:21
unsigned char lxb_char_t
Definition types.h:27
value
new_op_array scope