File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,5 @@ return {
4040 start = start ,
4141 wait = wait ,
4242 external_sender = boot .external_sender ,
43+ log_sender = boot .log_sender ,
4344}
Original file line number Diff line number Diff line change @@ -1086,6 +1086,16 @@ ltask_external_sender(lua_State *L) {
10861086 return 2 ;
10871087}
10881088
1089+ static int
1090+ ltask_log_sender (lua_State * L ) {
1091+ luaL_checktype (L , 1 , LUA_TUSERDATA );
1092+ struct task_context * ctx = (struct task_context * )lua_touserdata (L , 1 );
1093+ struct ltask * task = ctx -> task ;
1094+ lua_pushlightuserdata (L , pushlog );
1095+ lua_pushlightuserdata (L , task );
1096+ return 2 ;
1097+ }
1098+
10891099LUAMOD_API int
10901100luaopen_ltask_bootstrap (lua_State * L ) {
10911101 static atomic_int init = 0 ;
@@ -1109,6 +1119,7 @@ luaopen_ltask_bootstrap(lua_State *L) {
11091119 { "remove" , luaseri_remove },
11101120 { "unpack_remove" , luaseri_unpack_remove },
11111121 { "external_sender" , ltask_external_sender },
1122+ { "log_sender" , ltask_log_sender },
11121123 { NULL , NULL },
11131124 };
11141125
You can’t perform that action at this time.
0 commit comments