webmcp

changeset 168:e618ccd017a3

Cleaned up macros for json.import function
author jbe
date Fri Aug 01 02:48:18 2014 +0200 (2014-08-01)
parents 84497222db4e
children 681367a16657
files libraries/json/json.c
line diff
     1.1 --- a/libraries/json/json.c	Fri Aug 01 02:31:13 2014 +0200
     1.2 +++ b/libraries/json/json.c	Fri Aug 01 02:48:18 2014 +0200
     1.3 @@ -100,10 +100,6 @@
     1.4    return json_mark(L, json_regpointer(arraymt));
     1.5  }
     1.6  
     1.7 -#define json_utf16_surrogate(x) ((x) >= 0xD800 && (x) <= 0xDFFF)
     1.8 -#define json_utf16_lead(x) ((x) >= 0xD800 && (x) <= 0xDBFF)
     1.9 -#define json_utf16_tail(x) ((x) >= 0xDC00 && (x) <= 0xDFFF)
    1.10 -
    1.11  // internal states of JSON parser:
    1.12  #define JSON_STATE_VALUE 0
    1.13  #define JSON_STATE_OBJECT_KEY 1
    1.14 @@ -119,7 +115,10 @@
    1.15  #define json_import_arraymt_idx 3
    1.16  #define json_import_shadowtbl_idx 4
    1.17  
    1.18 -// macro for hex decoding:
    1.19 +// macros for hex decoding:
    1.20 +#define json_utf16_surrogate(x) ((x) >= 0xD800 && (x) <= 0xDFFF)
    1.21 +#define json_utf16_lead(x) ((x) >= 0xD800 && (x) <= 0xDBFF)
    1.22 +#define json_utf16_tail(x) ((x) >= 0xDC00 && (x) <= 0xDFFF)
    1.23  #define json_import_readhex(x) \
    1.24    do { \
    1.25      x = 0; \

Impressum / About Us