From ebb4e7d8c3b97b133510eb9c21c8d5c76fe8d268 Mon Sep 17 00:00:00 2001 From: Jinhong Date: Thu, 2 Jul 2020 11:21:24 +0900 Subject: [PATCH] jansson.h header file fix --- jansson/2.1.2/include/jansson.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jansson/2.1.2/include/jansson.h b/jansson/2.1.2/include/jansson.h index e4e73e2..56566eb 100644 --- a/jansson/2.1.2/include/jansson.h +++ b/jansson/2.1.2/include/jansson.h @@ -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) -- GitLab