mirror of
https://github.com/json-c/json-c.git
synced 2026-04-09 23:39:06 +08:00
Make sure to include the "*" on function pointer arguments to avoid a warnings from VS2015. See also PR#384.
This commit is contained in:
@@ -269,7 +269,7 @@ void json_object_set_userdata(json_object *jso, void *userdata,
|
|||||||
/* set a custom conversion to string */
|
/* set a custom conversion to string */
|
||||||
|
|
||||||
void json_object_set_serializer(json_object *jso,
|
void json_object_set_serializer(json_object *jso,
|
||||||
json_object_to_json_string_fn to_string_func,
|
json_object_to_json_string_fn *to_string_func,
|
||||||
void *userdata,
|
void *userdata,
|
||||||
json_object_delete_fn *user_delete)
|
json_object_delete_fn *user_delete)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ JSON_EXPORT void json_object_set_userdata(json_object *jso, void *userdata,
|
|||||||
* @param user_delete an optional function from freeing userdata
|
* @param user_delete an optional function from freeing userdata
|
||||||
*/
|
*/
|
||||||
JSON_EXPORT void json_object_set_serializer(json_object *jso,
|
JSON_EXPORT void json_object_set_serializer(json_object *jso,
|
||||||
json_object_to_json_string_fn to_string_func,
|
json_object_to_json_string_fn *to_string_func,
|
||||||
void *userdata,
|
void *userdata,
|
||||||
json_object_delete_fn *user_delete);
|
json_object_delete_fn *user_delete);
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
|
|
||||||
static int _json_c_visit(json_object *jso, json_object *parent_jso,
|
static int _json_c_visit(json_object *jso, json_object *parent_jso,
|
||||||
const char *jso_key, size_t *jso_index,
|
const char *jso_key, size_t *jso_index,
|
||||||
json_c_visit_userfunc userfunc, void *userarg);
|
json_c_visit_userfunc *userfunc, void *userarg);
|
||||||
|
|
||||||
int json_c_visit(json_object *jso, int future_flags,
|
int json_c_visit(json_object *jso, int future_flags,
|
||||||
json_c_visit_userfunc userfunc, void *userarg)
|
json_c_visit_userfunc *userfunc, void *userarg)
|
||||||
{
|
{
|
||||||
int ret = _json_c_visit(jso, NULL, NULL, NULL, userfunc, userarg);
|
int ret = _json_c_visit(jso, NULL, NULL, NULL, userfunc, userarg);
|
||||||
switch(ret)
|
switch(ret)
|
||||||
@@ -34,7 +34,7 @@ int json_c_visit(json_object *jso, int future_flags,
|
|||||||
}
|
}
|
||||||
static int _json_c_visit(json_object *jso, json_object *parent_jso,
|
static int _json_c_visit(json_object *jso, json_object *parent_jso,
|
||||||
const char *jso_key, size_t *jso_index,
|
const char *jso_key, size_t *jso_index,
|
||||||
json_c_visit_userfunc userfunc, void *userarg)
|
json_c_visit_userfunc *userfunc, void *userarg)
|
||||||
{
|
{
|
||||||
int userret = userfunc(jso, 0, parent_jso, jso_key, jso_index, userarg);
|
int userret = userfunc(jso, 0, parent_jso, jso_key, jso_index, userarg);
|
||||||
switch(userret)
|
switch(userret)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ typedef int (json_c_visit_userfunc)(json_object *jso, int flags,
|
|||||||
* userfunc returned JSON_C_VISIT_RETURN_ERROR.
|
* userfunc returned JSON_C_VISIT_RETURN_ERROR.
|
||||||
*/
|
*/
|
||||||
int json_c_visit(json_object *jso, int future_flags,
|
int json_c_visit(json_object *jso, int future_flags,
|
||||||
json_c_visit_userfunc userfunc, void *userarg);
|
json_c_visit_userfunc *userfunc, void *userarg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Passed to json_c_visit_userfunc as one of the flags values to indicate
|
* Passed to json_c_visit_userfunc as one of the flags values to indicate
|
||||||
|
|||||||
Reference in New Issue
Block a user