From d99ffa920dadc8ff9ef8cade2436e26d8fa9a6b2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 11 Apr 2014 16:53:45 -0300 Subject: new type 'LUAI_UACINT' (result of an 'usual argument conversion' of a lua_Integer) --- lobject.c | 4 ++-- luaconf.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lobject.c b/lobject.c index 3bc942a9..4e8b1d8e 100644 --- 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 index cbedd587..68a02fc4 100644 --- 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 + /* }================================================================== */ -- cgit v1.2.3-55-g6feb