Browse Source

Support build for Lua 5.1 (for LuaJIT), Lua 5.2 and Lua 5.3 (Step 1/?)

See #195
bel 9 năm trước cách đây
mục cha
commit
2c614b584c
2 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 4 0
      src/third_party/lfs.c
  2. 4 0
      src/third_party/lsqlite3.c

+ 4 - 0
src/third_party/lfs.c

@@ -20,6 +20,10 @@
 ** $Id: lfs.c,v 1.61 2009/07/04 02:10:16 mascarenhas Exp $
 */
 
+#if LUA_VERSION_NUM == 501
+#define lua_pushinteger lua_pushnumber
+#endif
+
 #ifndef LFS_DO_NOT_USE_LARGE_FILE
 #ifndef _WIN32
 #ifndef _AIX

+ 4 - 0
src/third_party/lsqlite3.c

@@ -34,6 +34,10 @@
 #include "lua.h"
 #include "lauxlib.h"
 
+#if LUA_VERSION_NUM == 501
+#define lua_pushinteger lua_pushnumber
+#endif
+
 #if LUA_VERSION_NUM > 501
 /*
 ** Lua 5.2