From 66a991830ea988915e33b40cc95d511244a1b9be Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 17 Sep 2014 18:33:43 -0400 Subject: [PATCH] Mve NITEMS where it needs to be. Unit test passes. --- microjson.h | 4 +++- test_microjson.c | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/microjson.h b/microjson.h index 47e2671..0629811 100644 --- a/microjson.h +++ b/microjson.h @@ -1,12 +1,14 @@ /* Structures for JSON parsing using only fixed-extent memory * - * This file is Copyright (c) 2010 by the GPSD project + * This file is Copyright (c) 2014 by Eric S. Raymond. * BSD terms apply: see the file COPYING in the distribution root for details. */ #include #include +#define NITEMS(x) (int)(sizeof(x)/sizeof(x[0])) + typedef enum {t_integer, t_uinteger, t_real, t_string, t_boolean, t_character, t_time, diff --git a/test_microjson.c b/test_microjson.c index 68e7d8b..70c9cb2 100644 --- a/test_microjson.c +++ b/test_microjson.c @@ -33,8 +33,6 @@ #define DEVDEFAULT_STOPBITS 3 #define DEVDEFAULT_NATIVE -1 -#define NITEMS(x) (int)(sizeof(x)/sizeof(x[0])) - typedef double timestamp_t; /* Unix time in seconds with fractional part */ struct dop_t { -- 2.43.0