mirror of
https://github.com/DaveGamble/cJSON
synced 2025-04-27 05:37:55 +00:00
Merge d34dda6d6e
into 12c4bf1986
This commit is contained in:
commit
32e2cd57a7
9
cJSON.c
9
cJSON.c
@ -121,12 +121,13 @@ CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item)
|
||||
#error cJSON.h and cJSON.c have different versions. Make sure that both have the same.
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_(s) #s
|
||||
#define STRINGIFY(s) STRINGIFY_(s)
|
||||
|
||||
CJSON_PUBLIC(const char*) cJSON_Version(void)
|
||||
{
|
||||
static char version[15];
|
||||
sprintf(version, "%i.%i.%i", CJSON_VERSION_MAJOR, CJSON_VERSION_MINOR, CJSON_VERSION_PATCH);
|
||||
|
||||
return version;
|
||||
return STRINGIFY(CJSON_VERSION_MAJOR) "." STRINGIFY(CJSON_VERSION_MINOR) "." \
|
||||
STRINGIFY(CJSON_VERSION_PATCH);
|
||||
}
|
||||
|
||||
/* Case insensitive string comparison, doesn't consider two NULL pointers equal though */
|
||||
|
Loading…
Reference in New Issue
Block a user