mirror of https://github.com/rusefi/lua.git
'long' may have more than 32 bits in some machines; use 'int' for
small lua_Integer unless necessary to use 'long'
This commit is contained in:
parent
de6e5a5919
commit
45f3797a5b
17
luaconf.h
17
luaconf.h
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: luaconf.h,v 1.182 2013/06/13 19:35:08 roberto Exp roberto $
|
||||
** $Id: luaconf.h,v 1.183 2013/06/20 15:02:49 roberto Exp roberto $
|
||||
** Configuration file for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
@ -494,14 +494,21 @@
|
|||
|
||||
#if LUA_SMALL_INT /* { */
|
||||
|
||||
#define LUA_INTEGER long
|
||||
#if LUAI_BITSINT >= 32
|
||||
|
||||
#define LUA_INTEGER int
|
||||
#define LUA_INTEGER_FRMLEN ""
|
||||
|
||||
#else
|
||||
|
||||
#define LUA_INTEGER long
|
||||
#define LUA_INTEGER_FRMLEN "l"
|
||||
|
||||
#endif
|
||||
|
||||
#else /* }{ */
|
||||
|
||||
#define LUA_INTEGER long long
|
||||
|
||||
#define LUA_INTEGER long long
|
||||
#define LUA_INTEGER_FRMLEN "ll"
|
||||
|
||||
#endif /* } */
|
||||
|
@ -510,7 +517,7 @@
|
|||
#define LUA_INTEGER_FMT "%" LUA_INTEGER_FRMLEN "d"
|
||||
#define lua_integer2str(s,n) sprintf((s), LUA_INTEGER_FMT, (n))
|
||||
|
||||
#define LUA_UNSIGNED unsigned LUA_INTEGER
|
||||
#define LUA_UNSIGNED unsigned LUA_INTEGER
|
||||
|
||||
/* }================================================================== */
|
||||
|
||||
|
|
Loading…
Reference in New Issue