]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Undo a bit of 2d1da5ab: handle per-thread formats for double serialization, even...
authorEric Haszlakiewicz <erh+git@nimenees.com>
Tue, 5 Sep 2017 05:56:42 +0000 (01:56 -0400)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Tue, 5 Sep 2017 05:56:42 +0000 (01:56 -0400)
json_object.c

index fcda69fb7f17e3d71da9fc5dcb8a7920737fc620..ec4e2b6e2b48f8af41b1b8266f4fa9c1a7fff92a 100644 (file)
@@ -703,7 +703,7 @@ int json_object_set_int64(struct json_object *jso,int64_t new_value){
 
 /* json_object_double */
 
-#if defined(HAVE___THREAD) && defined(ENABLE_THREADING)
+#if defined(HAVE___THREAD)
 // i.e. __thread or __declspec(thread)
 static SPEC___THREAD char *tls_serialization_float_format = NULL;
 #endif
@@ -713,7 +713,7 @@ int json_c_set_serialization_double_format(const char *double_format, int global
 {
        if (global_or_thread == JSON_C_OPTION_GLOBAL)
        {
-#if defined(HAVE___THREAD) && defined(ENABLE_THREADING)
+#if defined(HAVE___THREAD)
                if (tls_serialization_float_format)
                {
                        free(tls_serialization_float_format);
@@ -726,7 +726,7 @@ int json_c_set_serialization_double_format(const char *double_format, int global
        }
        else if (global_or_thread == JSON_C_OPTION_THREAD)
        {
-#if defined(HAVE___THREAD) && defined(ENABLE_THREADING)
+#if defined(HAVE___THREAD)
                if (tls_serialization_float_format)
                {
                        free(tls_serialization_float_format);
@@ -775,7 +775,7 @@ static int json_object_double_to_json_string_format(struct json_object* jso,
        {
                const char *std_format = "%.17g";
 
-#if defined(HAVE___THREAD) && defined(ENABLE_THREADING)
+#if defined(HAVE___THREAD)
                if (tls_serialization_float_format)
                        std_format = tls_serialization_float_format;
                else