From fdc3369e8c917f8861ac99a9f5ceda1127e513bb Mon Sep 17 00:00:00 2001 From: pelijah Date: Thu, 16 May 2024 02:08:40 +0300 Subject: [PATCH] Remove unused sdb ptr API (#4492) --- librz/arch/esil/esil.c | 5 ----- librz/util/sdb/src/num.c | 10 ---------- librz/util/sdb/src/sdb.h | 4 ---- 3 files changed, 19 deletions(-) diff --git a/librz/arch/esil/esil.c b/librz/arch/esil/esil.c index 147f434c7e9..a47ea30b7a7 100644 --- a/librz/arch/esil/esil.c +++ b/librz/arch/esil/esil.c @@ -140,11 +140,6 @@ static bool rz_analysis_esil_fire_trap(RzAnalysisEsil *esil, int trap_type, int } } } -#if 0 - RzAnalysisEsilTrapCB icb; - icb = (RzAnalysisEsilTrapCB)sdb_ptr_get (esil->traps, i, 0); - return icb (esil, trap_type, trap_code); -#endif return false; } diff --git a/librz/util/sdb/src/num.c b/librz/util/sdb/src/num.c index a36d0d5aae6..df1b1ac5955 100644 --- a/librz/util/sdb/src/num.c +++ b/librz/util/sdb/src/num.c @@ -72,13 +72,3 @@ RZ_API bool sdb_bool_get(Sdb *db, const char *str) { const char *b = sdb_const_get(db, str); return b && (!strcmp(b, "1") || !strcmp(b, "true")); } - -/* pointers */ - -RZ_API int sdb_ptr_set(Sdb *db, const char *key, void *p) { - return sdb_num_set(db, key, (ut64)(size_t)p); -} - -RZ_API void *sdb_ptr_get(Sdb *db, const char *key) { - return (void *)(size_t)sdb_num_get(db, key); -} diff --git a/librz/util/sdb/src/sdb.h b/librz/util/sdb/src/sdb.h index 3f3a549c7bb..179eea5adcc 100644 --- a/librz/util/sdb/src/sdb.h +++ b/librz/util/sdb/src/sdb.h @@ -177,10 +177,6 @@ RZ_API ut64 sdb_num_dec(Sdb *s, const char *key, ut64 n); RZ_API int sdb_num_min(Sdb *s, const char *key, ut64 v); RZ_API int sdb_num_max(Sdb *s, const char *key, ut64 v); -/* ptr */ -RZ_API int sdb_ptr_set(Sdb *db, const char *key, void *p); -RZ_API void *sdb_ptr_get(Sdb *db, const char *key); - /* create db */ RZ_API bool sdb_disk_create(Sdb *s); RZ_API bool sdb_disk_insert(Sdb *s, const char *key, const char *val);