From 85bf3b798f6d52c374c35f7fbe47df132891d3b2 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Fri, 30 Dec 2011 17:48:12 +1030 Subject: Add support for Lua 5.2 and cjson.new Update all Lua scripts to use new module init style everywhere: local json = require "cjson" Lua CJSON does not register a global table under Lua 5.2. The global table can be disabled under Lua 5.1 with DISABLE_CJSON_GLOBAL. Other changes: - Store CJSON configuration as an upvalue for each function. - Add "cjson.new" function to create another module table with a separate configuration. - Add _NAME and _VERSION variables. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fb63d99..c9343f9 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ LUA_VERSION = 5.1 ## Available defines for CJSON_CFLAGS # -# USE_INTERNAL_ISINF: Workaround for Solaris platforms missing isinf(). +# USE_INTERNAL_ISINF: Workaround for Solaris platforms missing isinf(). +# DISABLE_CJSON_GLOBAL: Do not store module is "cjson" global ## Build defaults PREFIX = /usr/local -- cgit v1.2.3-55-g6feb