| 1000 | } |
| 1001 | |
| 1002 | LUA_API int lua_docompiledfile(lua_State *L, const char *filename) |
| 1003 | { |
| 1004 | try |
| 1005 | { |
| 1006 | if (luaL_loadfile(L, filename)) |
| 1007 | { |
| 1008 | printf("error\n"); |
| 1009 | return LUA_ERRRUN; |
| 1010 | } |
| 1011 | lua_pcall(L, 0, 0, 0); |
| 1012 | return LUA_OK; |
| 1013 | } |
| 1014 | catch(const std::exception &e) |
| 1015 | { |
| 1016 | global_glua_chain_api->throw_exception(L, THINKYOUNG_API_SIMPLE_ERROR, "error in load bytecode file, %s", e.what()); |
| 1017 | return LUA_ERRRUN; |
| 1018 | } |
| 1019 | } |
| 1020 | |
| 1021 | LUA_API int lua_docompiled_bytestream(lua_State *L, void *stream_addr) |
| 1022 | { |
no test coverage detected