Merge branch '1.2'
[jansson.git] / src / value.c
index f74c684..e024fdb 100644 (file)
@@ -6,6 +6,9 @@
  */
 
 #define _GNU_SOURCE
+
+#include <config.h>
+
 #include <stdlib.h>
 #include <string.h>
 
@@ -833,7 +836,7 @@ json_t *json_true(void)
 {
     static json_t the_true = {
         .type = JSON_TRUE,
-        .refcount = (unsigned int)1
+        .refcount = (unsigned int)-1
     };
     return &the_true;
 }
@@ -843,7 +846,7 @@ json_t *json_false(void)
 {
     static json_t the_false = {
         .type = JSON_FALSE,
-        .refcount = (unsigned int)1
+        .refcount = (unsigned int)-1
     };
     return &the_false;
 }
@@ -853,7 +856,7 @@ json_t *json_null(void)
 {
     static json_t the_null = {
         .type = JSON_NULL,
-        .refcount = (unsigned int)1
+        .refcount = (unsigned int)-1
     };
     return &the_null;
 }