[前][次][番号順一覧][スレッド一覧]

ruby-changes:57609

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 6 Sep 2019 16:43:46 +0900 (JST)
Subject: [ruby-changes:57609] 2aa4fb57d1 (master): nullptr is a C++11ism.

https://git.ruby-lang.org/ruby.git/commit/?id=2aa4fb57d1

From 2aa4fb57d103b8deec43de6735e23a1c9b8c8fa0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Fri, 6 Sep 2019 16:42:45 +0900
Subject: nullptr is a C++11ism.

Should use numeric 0 for maximum portability.
See also https://travis-ci.org/ruby/ruby/jobs/581543798

diff --git a/ext/-test-/cxxanyargs/cxxanyargs.cpp b/ext/-test-/cxxanyargs/cxxanyargs.cpp
index 9912a66..28d99b9 100644
--- a/ext/-test-/cxxanyargs/cxxanyargs.cpp
+++ b/ext/-test-/cxxanyargs/cxxanyargs.cpp
@@ -178,8 +178,9 @@ namespace test_rb_catch { https://github.com/ruby/ruby/blob/trunk/ext/-test-/cxxanyargs/cxxanyargs.cpp#L178
     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
     }
 }
 
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]