const char *get_field_string(parsertype p, void *e, const char *path) { switch (p) { case LIBCFG_PARSER: return get_field_string_libconfig(e, path); case JSON_PARSER: return get_field_string_json(e, path); } return NULL; }
static void get_field_string(parsertype p, void *e, const char *path, char *dest, size_t n) { switch (p) { case LIBCFG_PARSER: get_field_string_libconfig(e, path, dest, n); break; case JSON_PARSER: get_field_string_json(e, path, dest, n); break; } }