new API function 'lua_mainthread'

This commit is contained in:
Roberto Ierusalimschy
2009-06-15 16:51:31 -03:00
parent 49b88b1c39
commit a21c89ddc8
3 changed files with 12 additions and 3 deletions

7
lapi.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 2.76 2009/04/17 22:00:01 roberto Exp roberto $
** $Id: lapi.c,v 2.78 2009/06/01 19:09:26 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -99,6 +99,11 @@ LUA_API int lua_checkstack (lua_State *L, int size) {
}
LUA_API lua_State *lua_mainthread (lua_State *L) {
return G(L)->mainthread;
}
LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) {
int i;
if (from == to) return;