Author: Florian Weimer Date: Wed Jan 3 12:33:55 2024 +0100 Ruby bindings: Return 0 on exceptions, not NULL At least Ruby 3.2 anf SWIG 4.1 expect an integer here, resulting in an int-conversion error with current/upcoming compilers. Return 0 instead of NULL works with pointer return types, too, should there be a supported Ruby version which uses a pointer in this context. Submitted upstream: diff --git a/mapscript/ruby/rbmodule.i b/mapscript/ruby/rbmodule.i index e5ce85e4883e3ef6..47eda59e32c704d8 100644 --- a/mapscript/ruby/rbmodule.i +++ b/mapscript/ruby/rbmodule.i @@ -129,7 +129,7 @@ static void _raise_ms_exception() { default: _raise_ms_exception(); msResetErrorList(); - return NULL; + return 0; } }