@lonvia commented on this pull request.
> + std::array<char, 2> tmp{"x"};
+ tmp[0] = osmium::item_type_to_char(member.type());
+ luaX_add_table_str(lua_state, "type", tmp.data());
+ luaX_add_table_int(lua_state, "ref", member.ref());
+ luaX_add_table_str(lua_state, "role", member.role());
+ });
+ }
+
+ lua_pushliteral(lua_state, "tags");
+ lua_createtable(lua_state, 0, (int)object.tags().size());
+ for (auto const &tag : object.tags()) {
+ luaX_add_table_str(lua_state, tag.key(), tag.value());
+ }
+ lua_rawset(lua_state, -3);
+
+ // Set the metatable of this object
This is just an implementation detail. If we need functions later, we can
change it back to being a real Lua object (possibly of its own type). The user
shouldn't rely on the type and assume duck typing is in place.
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2344#discussion_r2167452828
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/2344/review/[email protected]>_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving