diff options
author | leaf corcoran <leafot@gmail.com> | 2019-09-22 13:43:18 -0700 |
---|---|---|
committer | leaf <leafot@gmail.com> | 2020-04-25 14:13:42 -0700 |
commit | f5cf8297aebfe8f23ccf086a671d6cacd1c1613e (patch) | |
tree | ea3094f88debcf551af49fe410d81807ffb2c61a | |
parent | dcd5c253ce2839c10cc4e40ca98202fc29270762 (diff) | |
download | lua-cjson-f5cf8297aebfe8f23ccf086a671d6cacd1c1613e.tar.gz lua-cjson-f5cf8297aebfe8f23ccf086a671d6cacd1c1613e.tar.bz2 lua-cjson-f5cf8297aebfe8f23ccf086a671d6cacd1c1613e.zip |
use macro instead of header defines for Lua 5.2+ support
-rw-r--r-- | lua_cjson.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lua_cjson.c b/lua_cjson.c index 020ba21..45ebe78 100644 --- a/lua_cjson.c +++ b/lua_cjson.c | |||
@@ -36,10 +36,6 @@ | |||
36 | * difficult to know object/array sizes ahead of time. | 36 | * difficult to know object/array sizes ahead of time. |
37 | */ | 37 | */ |
38 | 38 | ||
39 | |||
40 | #define LUA_COMPAT_ALL 1 | ||
41 | #define LUA_COMPAT_5_1 1 | ||
42 | |||
43 | #include <assert.h> | 39 | #include <assert.h> |
44 | #include <stdint.h> | 40 | #include <stdint.h> |
45 | #include <string.h> | 41 | #include <string.h> |
@@ -106,6 +102,10 @@ | |||
106 | #define json_lightudata_mask(ludata) (ludata) | 102 | #define json_lightudata_mask(ludata) (ludata) |
107 | #endif | 103 | #endif |
108 | 104 | ||
105 | #if LUA_VERSION_NUM > 501 | ||
106 | #define lua_objlen(L,i) lua_rawlen(L, (i)) | ||
107 | #endif | ||
108 | |||
109 | static const char * const *json_empty_array; | 109 | static const char * const *json_empty_array; |
110 | static const char * const *json_array; | 110 | static const char * const *json_array; |
111 | 111 | ||