summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-09-06 16:42:45 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-09-06 16:42:45 +0900
commit2aa4fb57d103b8deec43de6735e23a1c9b8c8fa0 (patch)
tree42269ebc404a578921a0a5d8abe02ca5c0b7cf90
parent7516c48b2744b563a6cb420c23c1ff8bdea72da6 (diff)
nullptr is a C++11ism.
Should use numeric 0 for maximum portability. See also https://travis-ci.org/ruby/ruby/jobs/581543798
-rw-r--r--ext/-test-/cxxanyargs/cxxanyargs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/-test-/cxxanyargs/cxxanyargs.cpp b/ext/-test-/cxxanyargs/cxxanyargs.cpp
index 9912a6694c..28d99b98ba 100644
--- a/ext/-test-/cxxanyargs/cxxanyargs.cpp
+++ b/ext/-test-/cxxanyargs/cxxanyargs.cpp
@@ -178,8 +178,9 @@ namespace test_rb_catch {
VALUE
test(VALUE self)
{
- rb_catch(nullptr, RUBY_METHOD_FUNC(catcher), self); // old
- return rb_catch(nullptr, catcher, self); // new
+ static const char *zero = 0;
+ rb_catch(zero, RUBY_METHOD_FUNC(catcher), self); // old
+ return rb_catch(zero, catcher, self); // new
}
}