/ Check-in [de28acd4]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add some #ifdef-ery to json1.c to avoid a duplicate typedef when used in the amalgamation, since some compilers become upset over duplicate typedefs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: de28acd42f29693341feb884b7223cd3d2b96730
User & Date: drh 2015-10-10 14:00:37
Context
2015-10-10
14:41
Compiler warning fixes: Rename some local variables from "j1" to avoid a name collision with the j1() bessel function in the math library. Omit a dummy initializer that gcc 4.6.3 does not like. check-in: 9ddef84d user: drh tags: trunk
14:00
Add some #ifdef-ery to json1.c to avoid a duplicate typedef when used in the amalgamation, since some compilers become upset over duplicate typedefs. check-in: de28acd4 user: drh tags: trunk
2015-10-09
20:40
The previous fix to JSON1 was not complete. A few more tweaks are needed for correct handling of all oversized integers. check-in: 4a47f017 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/json1.c.

    67     67     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    68     68     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    69     69     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    70     70     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    71     71   };
    72     72   #define safe_isspace(x) (jsonIsSpace[(unsigned char)x])
    73     73   
    74         -/* Unsigned integer types */
    75         -typedef sqlite3_uint64 u64;
    76         -typedef unsigned int u32;
    77         -typedef unsigned char u8;
           74  +#ifndef SQLITE_AMALGAMATION
           75  +  /* Unsigned integer types.  These are already defined in the sqliteInt.h,
           76  +  ** but the definitions need to be repeated for separate compilation. */
           77  +  typedef sqlite3_uint64 u64;
           78  +  typedef unsigned int u32;
           79  +  typedef unsigned char u8;
           80  +#endif
    78     81   
    79     82   /* Objects */
    80     83   typedef struct JsonString JsonString;
    81     84   typedef struct JsonNode JsonNode;
    82     85   typedef struct JsonParse JsonParse;
    83     86   
    84     87   /* An instance of this object represents a JSON string