diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-09-06 16:42:45 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-09-06 16:42:45 +0900 |
commit | 2aa4fb57d103b8deec43de6735e23a1c9b8c8fa0 (patch) | |
tree | 42269ebc404a578921a0a5d8abe02ca5c0b7cf90 /ext | |
parent | 7516c48b2744b563a6cb420c23c1ff8bdea72da6 (diff) | |
download | ruby-2aa4fb57d103b8deec43de6735e23a1c9b8c8fa0.tar.gz |
nullptr is a C++11ism.
Should use numeric 0 for maximum portability.
See also https://travis-ci.org/ruby/ruby/jobs/581543798
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/cxxanyargs/cxxanyargs.cpp | 5 |
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 } } |