diff options
author | Mark Pulford <mark@kyne.com.au> | 2011-12-13 22:29:11 +1030 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2011-12-13 22:29:11 +1030 |
commit | 5970e0a93f691bdb7134f6cc2598e6d5aca63c1b (patch) | |
tree | 7f751ce299a1ae00ecaeca6b55fc58f783d5d74b /lua_cjson.c | |
parent | 9748b8b9865515a5d0c9087a7fa4587f1abe4e5b (diff) | |
download | lua-cjson-5970e0a93f691bdb7134f6cc2598e6d5aca63c1b.tar.gz lua-cjson-5970e0a93f691bdb7134f6cc2598e6d5aca63c1b.tar.bz2 lua-cjson-5970e0a93f691bdb7134f6cc2598e6d5aca63c1b.zip |
Remove external VERSION #define for lua_cjson.c
The external #define complicates compilation but is only used in
lua_cjson.c and Makefile.
Diffstat (limited to '')
-rw-r--r-- | lua_cjson.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua_cjson.c b/lua_cjson.c index 806a67c..24fb13d 100644 --- a/lua_cjson.c +++ b/lua_cjson.c | |||
@@ -44,6 +44,10 @@ | |||
44 | 44 | ||
45 | #include "strbuf.h" | 45 | #include "strbuf.h" |
46 | 46 | ||
47 | #ifndef CJSON_VERSION | ||
48 | #define CJSON_VERSION "1.0.4" | ||
49 | #endif | ||
50 | |||
47 | /* Support to reset locale to POSIX for strtod() / sprintf(). | 51 | /* Support to reset locale to POSIX for strtod() / sprintf(). |
48 | * Some locales use comma as a decimal separator. This breaks JSON. */ | 52 | * Some locales use comma as a decimal separator. This breaks JSON. */ |
49 | #ifdef USE_POSIX_USELOCALE | 53 | #ifdef USE_POSIX_USELOCALE |
@@ -1338,7 +1342,7 @@ int luaopen_cjson(lua_State *l) | |||
1338 | lua_setfield(l, -2, "null"); | 1342 | lua_setfield(l, -2, "null"); |
1339 | 1343 | ||
1340 | /* Set cjson.version */ | 1344 | /* Set cjson.version */ |
1341 | lua_pushliteral(l, VERSION); | 1345 | lua_pushliteral(l, CJSON_VERSION); |
1342 | lua_setfield(l, -2, "version"); | 1346 | lua_setfield(l, -2, "version"); |
1343 | 1347 | ||
1344 | /* Return cjson table */ | 1348 | /* Return cjson table */ |