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

ruby-changes:45725

From: naruse <ko1@a...>
Date: Tue, 7 Mar 2017 15:33:54 +0900 (JST)
Subject: [ruby-changes:45725] naruse:r57798 (trunk): Use RB_POSFIXABLE and RB_NEGFIXABLE to avoid cast introduced at r57793

naruse	2017-03-07 15:33:49 +0900 (Tue, 07 Mar 2017)

  New Revision: 57798

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

  Log:
    Use RB_POSFIXABLE and RB_NEGFIXABLE to avoid cast introduced at r57793

  Modified files:
    trunk/internal.h
Index: internal.h
===================================================================
--- internal.h	(revision 57797)
+++ internal.h	(revision 57798)
@@ -368,7 +368,7 @@ ntz_intptr(uintptr_t x) https://github.com/ruby/ruby/blob/trunk/internal.h#L368
 # define DL2NUM(x) LL2NUM(x)
 #elif defined(HAVE_INT128_T)
 # define DLONG int128_t
-# define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
+# define DL2NUM(x) ((RB_POSFIXABLE(x) && RB_NEGFIXABLE(x)) ? LONG2FIX(x) : rb_int128t2big(x))
 VALUE rb_int128t2big(int128_t n);
 #endif
 

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

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