summaryrefslogtreecommitdiff
path: root/json.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-01-04 23:28:43 +0000
committerEric S. Raymond <esr@thyrsus.com>2010-01-04 23:28:43 +0000
commitff47beb08f85a781ad3224b072ee0234ad09c4ae (patch)
tree4102bc79cc0cc7263c29e8b5282b0f0f39920eb6 /json.h
parent89728c22f258e05d37d1dea4af1fb1b2ee5f5711 (diff)
downloadgpsd-ff47beb08f85a781ad3224b072ee0234ad09c4ae.tar.gz
Avoid a collision with typedef boolean.
All regression tests pass.
Diffstat (limited to 'json.h')
-rw-r--r--json.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/json.h b/json.h
index a65cdf2c..5bd85a42 100644
--- a/json.h
+++ b/json.h
@@ -4,8 +4,10 @@
#include <stdbool.h>
#include <ctype.h>
-typedef enum {integer, uinteger, real, string, boolean, character,
- object, structobject, array, check} json_type;
+typedef enum {t_integer, t_uinteger, t_real,
+ t_string, t_boolean, t_character,
+ t_object, t_structobject, t_array,
+ t_check} json_type;
#define nullbool -1 /* not true, not false */
@@ -102,7 +104,7 @@ void json_enable_debug(int, FILE *);
*/
#define STRUCTOBJECT(s, f) .addr.offset = offsetof(s, f)
#define STRUCTARRAY(a, e, n) \
- .addr.array.element_type = structobject, \
+ .addr.array.element_type = t_structobject, \
.addr.array.arr.objects.subtype = e, \
.addr.array.arr.objects.base = (char*)a, \
.addr.array.arr.objects.stride = sizeof(a[0]), \