From 4710572bf3f2fb202d0cb3dda95ef28c85ea1b81 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 27 Dec 2004 22:18:52 +0000 Subject: adding C-closure wrapping to lua, and using it. --- lib/lua/src/ldebug.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/lua/src/ldebug.c') 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; -- cgit v1.2.3