]> git.ipfire.org Git - thirdparty/pdns.git/commit
luawrapper: correct lua_pop argument 16334/head
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 21 Oct 2025 17:11:22 +0000 (19:11 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 21 Oct 2025 17:11:24 +0000 (19:11 +0200)
commit6b1e764cdddea74c380d62dd044bed536b042754
treef4784f676449cb6f1b13fec56c42754ad1ad196f
parented52c38cf2459f7c91cf4c75da39ef5069f0c7b3
luawrapper: correct lua_pop argument

a negative argument to _pop has defined behaviour but never
does what the user expects.

Note that none of this matters as Lua will adjust the stack to
the 1 top item, which is the pushed boolean, after `return 1`

but I get confused every time I read the negative version

Signed-off-by: Peter van Dijk <peter.van.dijk@powerdns.com>
ext/luawrapper/include/LuaContext.hpp