33 #define RZ_SERIALIZE_ERR(res, ...) \
36 rz_list_push(res, rz_str_newf(__VA_ARGS__)); \
60 #define RZ_KEY_PARSER_UNKNOWN -1
67 #define RZ_KEY_PARSER_SWITCH(parser, key) \
68 bool key_parser_found = false; \
69 int key_parser_v = (int)(size_t)ht_pp_find(parser, key, &key_parser_found); \
70 if (!key_parser_found) { \
71 key_parser_v = RZ_KEY_PARSER_UNKNOWN; \
82 #define RZ_KEY_PARSER_JSON(parser, json, child, body) \
83 if (json->type == RZ_JSON_OBJECT) { \
84 for (RzJson *child = json->children.first; child; child = child->next) { \
85 RZ_KEY_PARSER_SWITCH(parser, child->key) { body } \
104 #define RZ_SERIALIZE_SUB(db, subdb, res, ns, rip) \
106 subdb = sdb_ns(db, ns, false); \
108 RZ_SERIALIZE_ERR(res, "missing " ns " namespace"); \
129 #define RZ_SERIALIZE_SUB_DO(db, subdb, res, ns, call, rip) \
130 RZ_SERIALIZE_SUB(db, subdb, res, ns, rip); \
RzBinInfo * info(RzBinFile *bf)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
static void rz_key_parser_add(RzKeyParser *parser, const char *key, int val)
RzList RzSerializeResultInfo
Detailed info about a (de)serialization result.
HtPP RzKeyParser
Hashtable-based key parser to prevent strcmp chains.
static RzKeyParser * rz_key_parser_new(void)
static RzSerializeResultInfo * rz_serialize_result_info_new(void)
static void rz_serialize_result_info_free(RzSerializeResultInfo *info)
static void rz_key_parser_free(RzKeyParser *parser)