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

ruby-changes:39691

From: nobu <ko1@a...>
Date: Sun, 6 Sep 2015 08:14:34 +0900 (JST)
Subject: [ruby-changes:39691] nobu:r51772 (trunk): ruby.h: eval ASSUME argument

nobu	2015-09-06 08:14:18 +0900 (Sun, 06 Sep 2015)

  New Revision: 51772

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51772

  Log:
    ruby.h: eval ASSUME argument
    
    * include/ruby/ruby.h (ASSUME): evaluate the argument just once
      everywhere.

  Modified files:
    trunk/include/ruby/ruby.h
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 51771)
+++ include/ruby/ruby.h	(revision 51772)
@@ -48,7 +48,7 @@ extern "C" { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L48
 # ifdef UNREACHABLE
 #   define ASSUME(x) (LIKELY(!!(x)) ? (void)0 : UNREACHABLE)
 # else
-#   define ASSUME(x) ((void)0)
+#   define ASSUME(x) ((void)(x))
 # endif
 #endif
 #ifndef UNREACHABLE

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

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