Rizin
unix-like reverse engineering framework and cli tools
str_constpool.c File Reference

Go to the source code of this file.

Functions

static void kv_fini (HtPPKv *kv)
 
RZ_API bool rz_str_constpool_init (RzStrConstPool *pool)
 
RZ_API void rz_str_constpool_fini (RzStrConstPool *pool)
 
RZ_API const char * rz_str_constpool_get (RzStrConstPool *pool, const char *str)
 

Function Documentation

◆ kv_fini()

static void kv_fini ( HtPPKv *  kv)
static

Definition at line 6 of file str_constpool.c.

6  {
7  free(kv->key);
8 }
RZ_API void Ht_() free(HtName_(Ht) *ht)
Definition: ht_inc.c:130

References free().

Referenced by rz_str_constpool_init().

◆ rz_str_constpool_fini()

◆ rz_str_constpool_get()

RZ_API const char* rz_str_constpool_get ( RzStrConstPool pool,
const char *  str 
)

◆ rz_str_constpool_init()

RZ_API bool rz_str_constpool_init ( RzStrConstPool pool)

Definition at line 10 of file str_constpool.c.

10  {
11  pool->ht = ht_pp_new(NULL, kv_fini, NULL);
12  return pool->ht != NULL;
13 }
static void kv_fini(HtPPKv *kv)
Definition: str_constpool.c:6

References rz_str_constpool_t::ht, kv_fini(), and NULL.

Referenced by rz_analysis_new(), rz_bin_new(), rz_bin_source_line_info_builder_init(), rz_cons_canvas_new(), and rz_test_test_database_new().