[Tile-serving] [osm2pgsql-dev/osm2pgsql] Check that Lua functions on OSM object are called correctly (PR #2240)
Jochen Topf
notifications at github.com
Mon Aug 19 17:43:12 UTC 2024
The code that deals with functions called on the Lua OSM object given as parameter to the process callbacks is somewhat strange. The result is that calling "object.as_point()" etc. will work, but the correct Lua way to do this is "object:as_point()". This adds a check to all the functions that detects this case and prints a warning. It will also check that those functions are not called with any additional arguments.
Checking for this now, users will hopefully fix this. This gives us the opportunity later to change or code to be more in line with usual Lua syntax.
This will only print a warning once per function.
You can view, comment on, or merge this pull request online at:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2240
-- Commit Summary --
* Check that Lua functions on OSM object are called correctly
-- File Changes --
M src/output-flex.cpp (37)
-- Patch Links --
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2240.patch
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2240.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2240
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/2240 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20240819/0530d687/attachment.htm>
More information about the Tile-serving
mailing list