1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2026-03-02 04:09:18 +00:00

refactor: renamed getter functions of json node

This commit is contained in:
Falk Werner
2020-07-12 15:34:50 +02:00
parent bf8ba05863
commit ea15d8c5cf
17 changed files with 60 additions and 60 deletions

View File

@@ -40,21 +40,21 @@ wfp_impl_json_is_object(
}
bool
wfp_impl_json_get_bool(
wfp_impl_json_bool_get(
struct wfp_json const * json)
{
return (WFP_JSON_BOOL == json->type) ? json->value.b : false;
}
int
wfp_impl_json_get_int(
wfp_impl_json_int_get(
struct wfp_json const * json)
{
return (WFP_JSON_INT == json->type) ? json->value.i : 0;
}
const char *
wfp_impl_json_get_string(
wfp_impl_json_string_get(
struct wfp_json const * json)
{
return (WFP_JSON_STRING == json->type) ? json->value.s : "";

View File

@@ -36,15 +36,15 @@ wfp_impl_json_is_object(
struct wfp_json const * json);
extern bool
wfp_impl_json_get_bool(
wfp_impl_json_bool_get(
struct wfp_json const * json);
extern int
wfp_impl_json_get_int(
wfp_impl_json_int_get(
struct wfp_json const * json);
extern const char *
wfp_impl_json_get_string(
wfp_impl_json_string_get(
struct wfp_json const * json);
extern struct wfp_json const *