MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / uae_lua_load

Function uae_lua_load

src/luascript.cpp:147–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void uae_lua_load(const TCHAR *filename)
148{
149 char *fn;
150 lua_State *L = luaL_newstate();
151 luaL_openlibs(L);
152 fn = ua (filename);
153 int err = luaL_loadfilex(L, fn, NULL);
154 if (!err) {
155 err = lua_pcall(L, 0, LUA_MULTRET, 0);
156 if (!err) {
157 write_log (_T("'%s' loaded\n"), filename);
158 uae_lua_init_state (L);
159 }
160 }
161 if (err)
162 write_log (_T("'%s' initialization failed: %d\n"), filename, err);
163 xfree (fn);
164}
165
166void uae_lua_loadall(void)
167{

Callers 1

uae_lua_loadallFunction · 0.85

Calls 3

uaFunction · 0.85
uae_lua_init_stateFunction · 0.85
write_logFunction · 0.70

Tested by

no test coverage detected