add preload

This commit is contained in:
Cloud Wu
2014-04-29 20:04:06 +08:00
parent d16159c166
commit 12f46d21fe

View File

@@ -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");
lua_pushstring(L, 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_pushcfunction(L, traceback);