File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -309,11 +309,11 @@ void init_geometry_class(lua_State *lua_state)
309309 // Add metatable as osm2pgsql.Geometry so we can access it from Lua
310310 lua_setfield (lua_state, -3 , " Geometry" );
311311
312+ lua_pushvalue (lua_state, -1 );
313+ lua_setfield (lua_state, -2 , " __index" );
312314 luaX_add_table_func (lua_state, " __gc" , geom_gc);
313315 luaX_add_table_func (lua_state, " __len" , geom_num_geometries);
314316 luaX_add_table_func (lua_state, " __tostring" , geom_tostring);
315- lua_pushvalue (lua_state, -1 );
316- lua_setfield (lua_state, -2 , " __index" );
317317 luaX_add_table_func (lua_state, " area" , geom_area);
318318 luaX_add_table_func (lua_state, " length" , geom_length);
319319 luaX_add_table_func (lua_state, " centroid" , geom_centroid);
You can’t perform that action at this time.
0 commit comments