summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lua/src/lundump.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lua/src/lundump.h')
-rw-r--r--3rdparty/lua/src/lundump.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/3rdparty/lua/src/lundump.h b/3rdparty/lua/src/lundump.h
index aa5cc82f1b5..a97676ca185 100644
--- a/3rdparty/lua/src/lundump.h
+++ b/3rdparty/lua/src/lundump.h
@@ -1,5 +1,5 @@
/*
-** $Id: lundump.h,v 1.45 2015/09/08 15:41:05 roberto Exp $
+** $Id: lundump.h $
** load precompiled Lua chunks
** See Copyright Notice in lua.h
*/
@@ -18,8 +18,11 @@
#define LUAC_INT 0x5678
#define LUAC_NUM cast_num(370.5)
-#define MYINT(s) (s[0]-'0')
-#define LUAC_VERSION (MYINT(LUA_VERSION_MAJOR)*16+MYINT(LUA_VERSION_MINOR))
+/*
+** Encode major-minor version in one byte, one nibble for each
+*/
+#define LUAC_VERSION (((LUA_VERSION_NUM / 100) * 16) + LUA_VERSION_NUM % 100)
+
#define LUAC_FORMAT 0 /* this is the official format */
/* load one chunk; from lundump.c */