better support for extra user space associated with a Lua state

This commit is contained in:
Roberto Ierusalimschy
2014-07-24 11:00:16 -03:00
parent 55a710545c
commit baa0e23456
4 changed files with 23 additions and 11 deletions

4
lua.h
View File

@@ -1,5 +1,5 @@
/*
** $Id: lua.h,v 1.309 2014/07/17 13:53:37 roberto Exp roberto $
** $Id: lua.h,v 1.310 2014/07/22 18:07:47 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
@@ -332,6 +332,8 @@ LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
** ===============================================================
*/
#define lua_getextraspace(L) ((void *)((char *)(L) - LUA_EXTRASPACE))
#define lua_tonumber(L,i) lua_tonumberx(L,(i),NULL)
#define lua_tointeger(L,i) lua_tointegerx(L,(i),NULL)