make sure that LUAC_INT is a lua_Integer and that LUAC_NUM is

a lua_Number
This commit is contained in:
Roberto Ierusalimschy 2014-03-11 11:22:54 -03:00
parent 342a936599
commit 68f4ccdd00
1 changed files with 4 additions and 3 deletions

View File

@ -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))