sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

SOL_EXCEPTIONS_SAFE_PROPAGATION changes behaviour of nil arguments

Open tommaisey opened this issue 3 years ago • 1 comments

sol::state lua;
lua.set_function("f", [](sol::object) {});
lua.script("f(1)"); // ok
lua.script("f(nil)"); // ok only if SOL_EXCEPTIONS_SAFE_PROPAGATION 0

I'm using PUC Lua 5.1 and sol commit 6409634.

tommaisey avatar Apr 25 '22 15:04 tommaisey

Did you try just disabling the check inside sol? That is, commenting lines https://github.com/ThePhD/sol2/blob/develop/include/sol/stack_check_get_qualified.hpp#L56-L62 and https://github.com/ThePhD/sol2/blob/develop/include/sol/stack_check_get_unqualified.hpp#L59-L65 ?

roman-orekhov avatar Jul 07 '23 02:07 roman-orekhov