浏览代码

'lua_pushglobaltable' returns 'void'

Roberto Ierusalimschy 9 年之前
父节点
当前提交
aa66ca76ce
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lua.h

+ 2 - 2
lua.h

@@ -1,5 +1,5 @@
 /*
-** $Id: lua.h,v 1.329 2015/11/13 17:18:42 roberto Exp roberto $
+** $Id: lua.h,v 1.330 2016/01/13 17:55:19 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
@@ -361,7 +361,7 @@ LUA_API void      (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
 #define lua_pushliteral(L, s)	lua_pushstring(L, "" s)
 
 #define lua_pushglobaltable(L)  \
-	lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS)
+	((void)lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS))
 
 #define lua_tostring(L,i)	lua_tolstring(L, (i), NULL)