Skip to content
Snippets Groups Projects
Commit ebb4e7d8 authored by Jinhong's avatar Jinhong
Browse files

jansson.h header file fix

parent 2e1bebc2
No related branches found
No related tags found
No related merge requests found
......@@ -106,16 +106,16 @@ json_t *json_false(void);
json_t *json_null(void);
/* do not call JSON_INTERNAL_INCREF or JSON_INTERNAL_DECREF directly */
#if JSON_HAVE_ATOMIC_BUILTINS
#define JSON_INTERNAL_INCREF(json) __atomic_add_fetch(&json->refcount, 1, __ATOMIC_ACQUIRE)
#define JSON_INTERNAL_DECREF(json) __atomic_sub_fetch(&json->refcount, 1, __ATOMIC_RELEASE)
#elif JSON_HAVE_SYNC_BUILTINS
#define JSON_INTERNAL_INCREF(json) __sync_add_and_fetch(&json->refcount, 1)
#define JSON_INTERNAL_DECREF(json) __sync_sub_and_fetch(&json->refcount, 1)
#else
// #if JSON_HAVE_ATOMIC_BUILTINS
// #define JSON_INTERNAL_INCREF(json) __atomic_add_fetch(&json->refcount, 1, __ATOMIC_ACQUIRE)
// #define JSON_INTERNAL_DECREF(json) __atomic_sub_fetch(&json->refcount, 1, __ATOMIC_RELEASE)
// #elif JSON_HAVE_SYNC_BUILTINS
// #define JSON_INTERNAL_INCREF(json) __sync_add_and_fetch(&json->refcount, 1)
// #define JSON_INTERNAL_DECREF(json) __sync_sub_and_fetch(&json->refcount, 1)
// #else
#define JSON_INTERNAL_INCREF(json) (++json->refcount)
#define JSON_INTERNAL_DECREF(json) (--json->refcount)
#endif
// #endif
static JSON_INLINE
json_t *json_incref(json_t *json)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment