瀏覽代碼

make sure that LUAC_INT is a lua_Integer and that LUAC_NUM is
a lua_Number

Roberto Ierusalimschy 11 年之前
父節點
當前提交
68f4ccdd00
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      lundump.h

+ 4 - 3
lundump.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lundump.h,v 1.40 2014/02/27 16:56:20 roberto Exp roberto $
+** $Id: lundump.h,v 1.41 2014/03/10 19:52:47 roberto Exp roberto $
 ** load precompiled Lua chunks
 ** See Copyright Notice in lua.h
 */
@@ -7,6 +7,7 @@
 #ifndef lundump_h
 #define lundump_h
 
+#include "llimits.h"
 #include "lobject.h"
 #include "lzio.h"
 
@@ -14,8 +15,8 @@
 /* data to catch conversion errors */
 #define LUAC_DATA	"\x19\x93\r\n\x1a\n"
 
-#define LUAC_INT	0xABCD
-#define LUAC_NUM	370.5
+#define LUAC_INT	cast_integer(0xABCD)
+#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))