1
0
mirror of https://github.com/lua/lua.git synced 2025-01-28 06:03:00 +08:00

bug: lua_tounsignedx must cast to lua_Unsigned (of course...)

This commit is contained in:
Roberto Ierusalimschy 2014-11-29 15:24:05 -02:00
parent 125296c83d
commit 92f02fff11

4
lua.h
View File

@ -1,5 +1,5 @@
/*
** $Id: lua.h,v 1.321 2014/11/12 13:30:15 roberto Exp roberto $
** $Id: lua.h,v 1.322 2014/11/28 19:13:39 roberto Exp roberto $
** Lua - A Scripting Language
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
** See Copyright Notice at the end of this file
@ -382,7 +382,7 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
#if defined(LUA_COMPAT_APIINTCASTS)
#define lua_pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n))
#define lua_tounsignedx(L,i,is) ((lua_Integer)lua_tointegerx(L,i,is))
#define lua_tounsignedx(L,i,is) ((lua_Unsigned)lua_tointegerx(L,i,is))
#define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL)
#endif