Commit 28c4dc2
committed
Check that Lua functions on OSM object are called correctly
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.1 parent 53fd9cc commit 28c4dc2
1 file changed
+37
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
298 | 333 | | |
299 | 334 | | |
300 | 335 | | |
| |||
304 | 339 | | |
305 | 340 | | |
306 | 341 | | |
| 342 | + | |
| 343 | + | |
307 | 344 | | |
308 | 345 | | |
309 | 346 | | |
| |||
0 commit comments