diff options
| author | amelia squires <[email protected]> | 2025-04-14 14:03:08 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2025-04-14 14:03:08 -0500 |
| commit | 98d81e701a3e6c75b932ac75c872ae0e3f4d84f4 (patch) | |
| tree | 48c6107656e14cfbbcbb49424fc3454de850a5db /src/thread.c | |
| parent | 1e5025a1631bac15e69d3ef0feff78fc1f705354 (diff) | |
config change, local support, overall fixesnew-config
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c index db8e54e..a6be01b 100644 --- a/src/thread.c +++ b/src/thread.c @@ -125,8 +125,10 @@ void* handle_thread(void* _args){ lua_setmetatable(L, res_idx);
luaL_loadbuffer(L, args->function->c, args->function->len, "thread");
+ int x = lua_gettop(L);
str_free(args->function);
+ lua_assign_upvalues(L, x);
lua_pushvalue(L, res_idx);
lua_call(L, 1, 0);
@@ -182,9 +184,10 @@ int l_async(lua_State* oL){ lua_gc(L, LUA_GCSTOP);
luaL_openlibs(L);
- lua_getglobal(oL, "_G");
- luaI_deepcopy(oL, L, SKIP_GC);
- lua_set_global_table(L);
+ //lua_getglobal(oL, "_G");
+ //luaI_deepcopy(oL, L, SKIP_GC);
+ //lua_set_global_table(L);
+ luaI_copyvars(oL, L);
struct thread_info* args = calloc(1, sizeof * args);
args->L = L;
|
