return jso;
}
-extern void json_object_put(struct json_object *jso)
+int json_object_put(struct json_object *jso)
{
if(jso)
{
if (jso->_user_delete)
jso->_user_delete(jso, jso->_userdata);
jso->_delete(jso);
+ return 1;
}
}
+ return 0;
}
void json_object_object_del(struct json_object* jso, const char *key)
{
- lh_table_delete(jso->o.c_object, key);
+ lh_table_delete(jso->o.c_object, key);
}
* imbalance in the reference count.
*
* @param obj the json_object instance
+ * @returns 1 if the object was freed.
*/
-extern void json_object_put(struct json_object *obj);
-
+int json_object_put(struct json_object *obj);
/**
* Check if the json_object is of a given type