/ 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 Unified Diffs Ignore Whitespace Patch

Changes to ext/misc/json1.c.

67
68
69
70
71
72
73

74

75
76
77

78
79
80
81
82
83
84
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
};
#define safe_isspace(x) (jsonIsSpace[(unsigned char)x])


/* Unsigned integer types */

typedef sqlite3_uint64 u64;
typedef unsigned int u32;
typedef unsigned char u8;


/* Objects */
typedef struct JsonString JsonString;
typedef struct JsonNode JsonNode;
typedef struct JsonParse JsonParse;

/* An instance of this object represents a JSON string







>
|
>
|
|
|
>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
};
#define safe_isspace(x) (jsonIsSpace[(unsigned char)x])

#ifndef SQLITE_AMALGAMATION
  /* Unsigned integer types.  These are already defined in the sqliteInt.h,
  ** but the definitions need to be repeated for separate compilation. */
  typedef sqlite3_uint64 u64;
  typedef unsigned int u32;
  typedef unsigned char u8;
#endif

/* Objects */
typedef struct JsonString JsonString;
typedef struct JsonNode JsonNode;
typedef struct JsonParse JsonParse;

/* An instance of this object represents a JSON string