| 145 | } |
| 146 | |
| 147 | void 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 | |
| 166 | void uae_lua_loadall(void) |
| 167 | { |
no test coverage detected