| 155 | //============================================================================// |
| 156 | |
| 157 | static bool FreeLuaRef(lua_State* L, GLenum type) { |
| 158 | std::map<GLenum, int>::iterator it = luaRefs.find(type); |
| 159 | if (it != luaRefs.end()) { |
| 160 | luaL_unref(L, LUA_REGISTRYINDEX, it->second); |
| 161 | luaRefs.erase(it); |
| 162 | return true; |
| 163 | } |
| 164 | return false; |
| 165 | } |
| 166 | |
| 167 | |
| 168 | static bool CreateLuaRef(lua_State* L, int index, GLenum type) { |
no test coverage detected