lua

A copy of the Lua development repository
Log | Files | Refs | README

commit d99ffa920dadc8ff9ef8cade2436e26d8fa9a6b2
parent 2771050dfa0fe6b2b679a9f91749a1ab19cfe7dd
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Fri, 11 Apr 2014 16:53:20 -0300

new type 'LUAI_UACINT' (result of an 'usual argument conversion' of
a lua_Integer)

Diffstat:
Mlobject.c | 4++--
Mluaconf.h | 6+++++-
2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/lobject.c b/lobject.c @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 2.76 2014/03/21 13:52:33 roberto Exp roberto $ +** $Id: lobject.c,v 2.77 2014/04/09 17:05:11 roberto Exp roberto $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -346,7 +346,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { break; } case 'I': { - setivalue(L->top++, cast_integer(va_arg(argp, lua_Integer))); + setivalue(L->top++, cast_integer(va_arg(argp, l_uacInt))); break; } case 'f': { diff --git a/luaconf.h b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.194 2014/04/03 14:18:02 roberto Exp $ +** $Id: luaconf.h,v 1.195 2014/04/09 17:05:11 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -529,6 +529,8 @@ ** @@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER. ** +@@ LUAI_UACINT is the result of an 'usual argument conversion' +@* over a lUA_INTEGER. @@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers. @@ LUA_INTEGER_SCAN is the format for reading integers. @@ LUA_INTEGER_FMT is the format for writing integers. @@ -573,6 +575,8 @@ #define LUA_MAXINTEGER ((LUA_INTEGER)(~(LUA_UNSIGNED)0 >> 1)) #define LUA_MININTEGER ((LUA_INTEGER)~(~(LUA_UNSIGNED)0 >> 1)) +#define LUAI_UACINT LUA_INTEGER + /* }================================================================== */