diff options
author | pixel <pixel> | 2004-12-27 22:18:52 +0000 |
---|---|---|
committer | pixel <pixel> | 2004-12-27 22:18:52 +0000 |
commit | 4710572bf3f2fb202d0cb3dda95ef28c85ea1b81 (patch) | |
tree | badd157b2b2c3f18553c793f49f1294dc0637372 /lib/lua/src/ldebug.c | |
parent | ecb5155dfed400c50b3b54a758d546b7754bcbf1 (diff) |
adding C-closure wrapping to lua, and using it.
Diffstat (limited to 'lib/lua/src/ldebug.c')
-rw-r--r-- | lib/lua/src/ldebug.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/lua/src/ldebug.c b/lib/lua/src/ldebug.c index 65114c7..b154c1b 100644 --- a/lib/lua/src/ldebug.c +++ b/lib/lua/src/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.4 2004-11-27 21:46:07 pixel Exp $ +** $Id: ldebug.c,v 1.5 2004-12-27 22:18:53 pixel Exp $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -91,6 +91,16 @@ LUA_API int lua_gethookcount (lua_State *L) { } +LUA_API lua_CallWrap lua_setcallwrap (lua_State *L, lua_CallWrap func) { + lua_CallWrap old_func; + lua_lock(L); + old_func = L->callwrap; + L->callwrap = func; + lua_unlock(L); + return old_func; +} + + LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { int status; CallInfo *ci; |