diff options
| author | amelia squires <[email protected]> | 2025-04-16 13:54:00 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2025-04-16 13:54:00 -0500 |
| commit | b2ee662b4621282b137a2a2cf1be13bd60073c5a (patch) | |
| tree | 280ab21571a29f76d880c939642175602e6177e0 /src/thread.c | |
| parent | 8887668e977ff1c6e213768b954b086f6be0738c (diff) | |
fixes for 5.1v0.0.0
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c index c5ae933..f205165 100644 --- a/src/thread.c +++ b/src/thread.c @@ -8,6 +8,7 @@ #include "types/larray.h"
#include "hash/fnv.h"
+#include "table.h"
struct thread_info {
str* function;
@@ -338,6 +339,9 @@ void meta_proxy_gen(lua_State* L, struct thread_buffer *buffer, int meta_idx, in lua_pushlightuserdata(L, buffer);
lua_setglobal(L, "__this_obj");
+ lua_pushcfunction(L, l_unpack);
+ lua_setglobal(L, "__unpack");
+
lua_pushnil(L);
for(; lua_next(L, meta_idx) != 0;){
int k, v = lua_gettop(L);
@@ -346,7 +350,7 @@ void meta_proxy_gen(lua_State* L, struct thread_buffer *buffer, int meta_idx, in char* fn = calloc(128, sizeof * fn);
const char* key = lua_tostring(L, k);
sprintf(fn, "return function(_a,_b,_c)\
-return __proxy_call(__this_obj,'%s',table.unpack({_a,_b,_c}));end", key);
+return __proxy_call(__this_obj,'%s',__unpack({_a,_b,_c}));end", key);
luaL_dostring(L, fn);
free(fn);
|
