From 5970e0a93f691bdb7134f6cc2598e6d5aca63c1b Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Tue, 13 Dec 2011 22:29:11 +1030 Subject: Remove external VERSION #define for lua_cjson.c The external #define complicates compilation but is only used in lua_cjson.c and Makefile. --- lua_cjson.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lua_cjson.c') 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 @@ #include "strbuf.h" +#ifndef CJSON_VERSION +#define CJSON_VERSION "1.0.4" +#endif + /* Support to reset locale to POSIX for strtod() / sprintf(). * Some locales use comma as a decimal separator. This breaks JSON. */ #ifdef USE_POSIX_USELOCALE @@ -1338,7 +1342,7 @@ int luaopen_cjson(lua_State *l) lua_setfield(l, -2, "null"); /* Set cjson.version */ - lua_pushliteral(l, VERSION); + lua_pushliteral(l, CJSON_VERSION); lua_setfield(l, -2, "version"); /* Return cjson table */ -- cgit v1.2.3-55-g6feb