aboutsummaryrefslogtreecommitdiff
path: root/lua_cjson.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua_cjson.c')
-rw-r--r--lua_cjson.c6
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 */