diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-06-15 16:51:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-06-15 16:51:31 -0300 |
commit | a21c89ddc8b91c9fd4888577f7a6c60c4f640795 (patch) | |
tree | 393aa5c8213338b9b72d220bab87c3bdbae20f4f /lapi.c | |
parent | 49b88b1c39fca21f1f55e462e0f549b8187f89d6 (diff) | |
download | lua-a21c89ddc8b91c9fd4888577f7a6c60c4f640795.tar.gz lua-a21c89ddc8b91c9fd4888577f7a6c60c4f640795.tar.bz2 lua-a21c89ddc8b91c9fd4888577f7a6c60c4f640795.zip |
new API function 'lua_mainthread'
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.76 2009/04/17 22:00:01 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.78 2009/06/01 19:09:26 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -99,6 +99,11 @@ LUA_API int lua_checkstack (lua_State *L, int size) { | |||
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | LUA_API lua_State *lua_mainthread (lua_State *L) { | ||
103 | return G(L)->mainthread; | ||
104 | } | ||
105 | |||
106 | |||
102 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { | 107 | LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { |
103 | int i; | 108 | int i; |
104 | if (from == to) return; | 109 | if (from == to) return; |