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

ruby-changes:60710

From: Yusuke <ko1@a...>
Date: Thu, 9 Apr 2020 12:51:10 +0900 (JST)
Subject: [ruby-changes:60710] d2bb2e066b (master): include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler

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

From d2bb2e066b5a914283dd3ea473fc1762183af013 Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Thu, 9 Apr 2020 12:50:15 +0900
Subject: include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++
 compiler

NULL in C++ is esoteric

diff --git a/include/ruby/3/core/rtypeddata.h b/include/ruby/3/core/rtypeddata.h
index 21b0857..9ba1f36 100644
--- a/include/ruby/3/core/rtypeddata.h
+++ b/include/ruby/3/core/rtypeddata.h
@@ -160,8 +160,8 @@ RTYPEDDATA_TYPE(VALUE obj) https://github.com/ruby/ruby/blob/trunk/include/ruby/3/core/rtypeddata.h#L160
 #if ! RUBY_NDEBUG
     if (RB_UNLIKELY(! RTYPEDDATA_P(obj))) {
         rb_unexpected_type(obj, RUBY_T_DATA);
-# if ! defined(__sun) && ! RUBY3_COMPILER_IS(Intel)
-        RUBY3_UNREACHABLE_RETURN(NULL);
+# if ! defined(__sun)
+        RUBY3_UNREACHABLE_RETURN(0);
 # endif
     }
 #endif
-- 
cgit v0.10.2


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

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