From a087c2737441aad781be7e3d88775e688152ad4e Mon Sep 17 00:00:00 2001 From: moteus Date: Fri, 27 Dec 2013 18:25:00 +0400 Subject: Add. pass cfunctions to child thread. --- src/llthread.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/llthread.c b/src/llthread.c index 668a8c8..88498a8 100644 --- a/src/llthread.c +++ b/src/llthread.c @@ -228,6 +228,11 @@ static int llthread_copy_value(llthread_copy_state *state, int depth, int idx) { } break; case LUA_TFUNCTION: + if(lua_iscfunction(state->from_L, idx)){ + lua_CFunction fn = lua_tocfunction(state->from_L, idx); + lua_pushcfunction(state->to_L, fn); + break; + } case LUA_TUSERDATA: case LUA_TTHREAD: default: -- cgit v1.2.3-55-g6feb