MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / preload_modules

Function preload_modules

libaegisub/lua/modules.cpp:31–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29int regex_init(lua_State *L);
30
31void preload_modules(lua_State *L) {
32 luaL_openlibs(L);
33
34 lua_getglobal(L, "package");
35 lua_getfield(L, -1, "preload");
36
37 set_field(L, "aegisub.__re_impl", luaopen_re_impl);
38 set_field(L, "aegisub.__unicode_impl", luaopen_unicode_impl);
39 set_field(L, "aegisub.__lfs_impl", luaopen_lfs_impl);
40 set_field(L, "lpeg", luaopen_lpeg);
41 set_field(L, "luabins", luaopen_luabins);
42
43 lua_pop(L, 2);
44
45 register_lib_functions(L); // silence an unused static function warning
46}
47
48void do_register_lib_function(lua_State *L, const char *name, const char *type_name, void *func) {
49 lua_pushvalue(L, -2); // push cast function

Callers 2

mainFunction · 0.85
CreateMethod · 0.85

Calls 2

set_fieldFunction · 0.85
register_lib_functionsFunction · 0.85

Tested by 1

mainFunction · 0.68