2
0
Эх сурвалжийг харах

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

Roberto Ierusalimschy 11 жил өмнө
parent
commit
d99ffa920d
2 өөрчлөгдсөн 7 нэмэгдсэн , 3 устгасан
  1. 2 2
      lobject.c
  2. 5 1
      luaconf.h

+ 2 - 2
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': {

+ 5 - 1
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
+
 /* }================================================================== */