mirror of
https://github.com/json-c/json-c.git
synced 2026-04-02 03:49:06 +08:00
added tabs instead of spaces to be compatible with rest of code
This commit is contained in:
@@ -163,9 +163,9 @@ extern struct json_object* json_object_get(struct json_object *jso)
|
|||||||
if (!jso) return jso;
|
if (!jso) return jso;
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
__sync_add_and_fetch(&jso->_ref_count, 1);
|
__sync_add_and_fetch(&jso->_ref_count, 1);
|
||||||
#else
|
#else
|
||||||
++jso->_ref_count;
|
++jso->_ref_count;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return jso;
|
return jso;
|
||||||
@@ -176,15 +176,15 @@ int json_object_put(struct json_object *jso)
|
|||||||
if(!jso) return 0;
|
if(!jso) return 0;
|
||||||
|
|
||||||
#if defined __GNUC__
|
#if defined __GNUC__
|
||||||
if (__sync_fetch_and_sub(&jso->_ref_count, 1) > 0) return 0;
|
if (__sync_fetch_and_sub(&jso->_ref_count, 1) > 0) return 0;
|
||||||
#else
|
#else
|
||||||
if (--jso->_ref_count > 0) return 0;
|
if (--jso->_ref_count > 0) return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (jso->_user_delete)
|
if (jso->_user_delete)
|
||||||
jso->_user_delete(jso, jso->_userdata);
|
jso->_user_delete(jso, jso->_userdata);
|
||||||
jso->_delete(jso);
|
jso->_delete(jso);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user