c94e30a42b
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
26 lines
908 B
Diff
26 lines
908 B
Diff
Author: Florian Weimer <fweimer@redhat.com>
|
|
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: <https://github.com/MapServer/MapServer/pull/6998>
|
|
|
|
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;
|
|
}
|
|
|
|
}
|