10 int sr = snprintf(str, size, __VA_ARGS__); \
25 APPENDF(
"%c%s ", diff->
add ?
'+' :
'-', diff->
v ?
" " :
"NS");
28 const char *component;
52 #define DIFF(ctx, c, ret) \
54 (ctx)->equal = false; \
65 ctx->cb(&diff,
ctx->cb_user);
70 ctx->cb(&diff,
ctx->cb_user);
104 if (!other_val || !*other_val) {
108 }
else if (!
ctx->add && strcmp(
v, other_val) != 0) {
165 ctx.cb_user = cb_user;
RZ_API SdbList * ls_new(void)
RZ_API void * ls_pop(SdbList *list)
RZ_API void ls_free(SdbList *list)
#define ls_foreach(list, it, pos)
RZ_API Sdb * sdb_ns(Sdb *s, const char *name, int create)
RZ_API const char * sdb_const_get(Sdb *s, const char *key, ut32 *cas)
RZ_API bool sdb_foreach(Sdb *s, SdbForeachCallback cb, void *user)
void(* SdbDiffCallback)(const SdbDiff *diff, void *user)
static void sdb_diff_report_ns(SdbDiffCtx *ctx, SdbNs *ns, bool add)
static void sdb_diff_ctx(SdbDiffCtx *ctx)
struct sdb_diff_kv_cb_ctx SdbDiffKVCbCtx
static void sdb_diff_report_kv(SdbDiffCtx *ctx, const char *k, const char *v, bool add)
static bool sdb_diff_report_kv_cb(void *user, const char *k, const char *v)
static void sdb_diff_report(SdbDiffCtx *ctx, Sdb *sdb, bool add)
struct sdb_diff_ctx_t SdbDiffCtx
#define DIFF(ctx, c, ret)
RZ_API bool sdb_diff(Sdb *a, Sdb *b, SdbDiffCallback cb, void *cb_user)
static bool sdb_diff_kv_cb(void *user, const char *k, const char *v)
RZ_API int sdb_diff_format(char *str, int size, const SdbDiff *diff)