mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-07-17 15:01:03 +00:00
handle json is null
This commit is contained in:
parent
c185be9413
commit
faaff4cf7b
@ -144,7 +144,10 @@ searpc_set_objlist_to_ret_object (json_t *object, GList *ret)
|
|||||||
void
|
void
|
||||||
searpc_set_json_to_ret_object (json_t *object, json_t *ret)
|
searpc_set_json_to_ret_object (json_t *object, json_t *ret)
|
||||||
{
|
{
|
||||||
json_object_set_new (object, "ret", ret);
|
if (ret == NULL)
|
||||||
|
json_object_set_new(object, "ret", json_null ());
|
||||||
|
else
|
||||||
|
json_object_set_new (object, "ret", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
Loading…
Reference in New Issue
Block a user