-#define CPY_BUILD_META_FUNC(meta_type, func, val_type) \
-static int cpy_ ## func(void *meta, const char *key, val_type val) { \
- return func((meta_type *)meta, key, val); \
-}
-
-#define CPY_BUILD_META_HANDLER(func_prefix, meta_type) \
-CPY_BUILD_META_FUNC(meta_type, func_prefix ## _add_string, const char *) \
-CPY_BUILD_META_FUNC(meta_type, func_prefix ## _add_signed_int, int64_t) \
-CPY_BUILD_META_FUNC(meta_type, func_prefix ## _add_unsigned_int, uint64_t) \
-CPY_BUILD_META_FUNC(meta_type, func_prefix ## _add_double, double) \
-CPY_BUILD_META_FUNC(meta_type, func_prefix ## _add_boolean, _Bool) \
- \
-static cpy_build_meta_handler_t cpy_ ## func_prefix = { \
- .add_string = cpy_ ## func_prefix ## _add_string, \
- .add_signed_int = cpy_ ## func_prefix ## _add_signed_int, \
- .add_unsigned_int = cpy_ ## func_prefix ## _add_unsigned_int, \
- .add_double = cpy_ ## func_prefix ## _add_double, \
- .add_boolean = cpy_ ## func_prefix ## _add_boolean \
-}
-