summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-03-28 13:03:17 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-03-28 13:03:17 +0100
commit5fa12dafa8cb8f7158452356611967880745bba5 (patch)
treea91e34ed9e9b6a7c01395b977405e7ad1efa41a7 /ext/-test-
parent5b48686691c2443d8d7113e593494c4d9302da0e (diff)
The last argument of rb_rescue2() should always be (VALUE)0
* Otherwise it might segfault, since C has no idea of the type of varargs, and the C code must assume all varargs are VALUE.
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/cxxanyargs/cxxanyargs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/-test-/cxxanyargs/cxxanyargs.cpp b/ext/-test-/cxxanyargs/cxxanyargs.cpp
index 30790696db..cafd7f5bf7 100644
--- a/ext/-test-/cxxanyargs/cxxanyargs.cpp
+++ b/ext/-test-/cxxanyargs/cxxanyargs.cpp
@@ -181,13 +181,13 @@ namespace test_rb_rescue2 {
test(VALUE self)
{
#ifdef HAVE_NULLPTR
- rb_rescue2(RUBY_METHOD_FUNC(begin), self, nullptr, self, rb_eStandardError, rb_eFatal, 0);
- rb_rescue2(begin, self, nullptr, self, rb_eStandardError, rb_eFatal, 0);
+ rb_rescue2(RUBY_METHOD_FUNC(begin), self, nullptr, self, rb_eStandardError, rb_eFatal, (VALUE)0);
+ rb_rescue2(begin, self, nullptr, self, rb_eStandardError, rb_eFatal, (VALUE)0);
#endif
rb_rescue2(RUBY_METHOD_FUNC(begin), self, RUBY_METHOD_FUNC(rescue), self,
- rb_eStandardError, rb_eFatal, 0); // old
- return rb_rescue2(begin, self, rescue, self, rb_eStandardError, rb_eFatal, 0); // new
+ rb_eStandardError, rb_eFatal, (VALUE)0); // old
+ return rb_rescue2(begin, self, rescue, self, rb_eStandardError, rb_eFatal, (VALUE)0); // new
}
}