mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add preload
This commit is contained in:
@@ -89,7 +89,8 @@ _init(struct snlua *l, struct skynet_context *ctx, const char * args, size_t sz)
|
|||||||
const char *service = optstring(ctx, "luaservice", "./service/?.lua");
|
const char *service = optstring(ctx, "luaservice", "./service/?.lua");
|
||||||
lua_pushstring(L, service);
|
lua_pushstring(L, service);
|
||||||
lua_setglobal(L, "LUA_SERVICE");
|
lua_setglobal(L, "LUA_SERVICE");
|
||||||
const char *preload = skynet_command(ctx, "preload");
|
const char *preload = skynet_command(ctx, "GETENV", "preload");
|
||||||
|
lua_pushstring(L, preload);
|
||||||
lua_setglobal(L, "LUA_PRELOAD");
|
lua_setglobal(L, "LUA_PRELOAD");
|
||||||
|
|
||||||
lua_pushcfunction(L, traceback);
|
lua_pushcfunction(L, traceback);
|
||||||
|
|||||||
Reference in New Issue
Block a user