diff options
author | Petri Lehtinen <petri@digip.org> | 2010-03-23 08:15:19 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2010-03-23 08:15:19 +0200 |
commit | 49880cbabeb597a9c748a3d5f37e9961a084dce3 (patch) | |
tree | 1fe3b13386ab90454214682e5fcddb4435b6e611 /src | |
parent | 66a69f3f1056da25446b01b18e01c9484f432c68 (diff) | |
parent | f284e3c069abcdfc1145e939b0c284910c274d17 (diff) | |
download | jansson-49880cbabeb597a9c748a3d5f37e9961a084dce3.zip jansson-49880cbabeb597a9c748a3d5f37e9961a084dce3.tar.gz jansson-49880cbabeb597a9c748a3d5f37e9961a084dce3.tar.bz2 |
Merge branch '1.2'
Diffstat (limited to 'src')
-rw-r--r-- | src/dump.c | 1 | ||||
-rw-r--r-- | src/load.c | 1 | ||||
-rw-r--r-- | src/utf.c | 2 | ||||
-rw-r--r-- | src/utf.h | 9 | ||||
-rw-r--r-- | src/value.c | 6 |
5 files changed, 13 insertions, 6 deletions
@@ -9,7 +9,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <stdint.h> #include <assert.h> #include <jansson.h> @@ -14,7 +14,6 @@ #include <string.h> #include <stdarg.h> #include <assert.h> -#include <stdint.h> #include <jansson.h> #include "jansson_private.h" @@ -6,7 +6,7 @@ */ #include <string.h> -#include <stdint.h> +#include "utf.h" int utf8_encode(int32_t codepoint, char *buffer, int *size) { @@ -8,6 +8,15 @@ #ifndef UTF_H #define UTF_H +#include <config.h> + +#ifdef HAVE_INTTYPES_H +/* inttypes.h includes stdint.h in a standard environment, so there's +no need to include stdint.h separately. If inttypes.h doesn't define +int32_t, it's defined in config.h. */ +#include <inttypes.h> +#endif + int utf8_encode(int codepoint, char *buffer, int *size); int utf8_check_first(char byte); diff --git a/src/value.c b/src/value.c index f74c684..7c41c89 100644 --- a/src/value.c +++ b/src/value.c @@ -833,7 +833,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 +843,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 +853,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; } |