Skip to content

Commit

Permalink
Add LTASK_EXTERNAL_OPENLIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Feb 17, 2025
1 parent 17d7c86 commit 1328f49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
20 changes: 0 additions & 20 deletions LICENSE

This file was deleted.

6 changes: 5 additions & 1 deletion src/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include "message.h"
#include "systime.h"

#ifndef LTASK_EXTERNAL_OPENLIBS
#define LTASK_EXTERNAL_OPENLIBS luaL_openlibs
#endif

#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
Expand Down Expand Up @@ -132,7 +136,7 @@ init_service(lua_State *L) {
void *ud = lua_touserdata(L, 1);
size_t sz = lua_tointeger(L, 2);
init_service_key(L, ud, sz);
luaL_openlibs(L);
LTASK_EXTERNAL_OPENLIBS(L);
lua_gc(L, LUA_GCGEN, 0, 0);
return 0;
}
Expand Down

0 comments on commit 1328f49

Please sign in to comment.