| 1176 | } |
| 1177 | |
| 1178 | LuaFunction LuaEngine::createFunctionFromSource(int handleIndex, char const* contents, size_t size, char const* name) { |
| 1179 | lua_checkstack(m_state, 2); |
| 1180 | |
| 1181 | handleError(m_state, luaL_loadbufferx(m_state, contents, size, name, "t")); |
| 1182 | |
| 1183 | pushHandle(m_state, handleIndex); |
| 1184 | lua_setupvalue(m_state, -2, 1); |
| 1185 | |
| 1186 | return LuaFunction(LuaDetail::LuaHandle(RefPtr<LuaEngine>(this), popHandle(m_state))); |
| 1187 | } |
| 1188 | |
| 1189 | void LuaEngine::pushLuaValue(lua_State* state, LuaValue const& luaValue) { |
| 1190 | lua_checkstack(state, 1); |
nothing calls this directly
no test coverage detected