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

ruby-changes:32917

From: akr <ko1@a...>
Date: Sun, 16 Feb 2014 14:34:53 +0900 (JST)
Subject: [ruby-changes:32917] akr:r44996 (trunk): * include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.

akr	2014-02-16 14:34:48 +0900 (Sun, 16 Feb 2014)

  New Revision: 44996

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

  Log:
    * include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.
      (RBIGNUM_POSITIVE_P): Ditto.
      (RBIGNUM_NEGATIVE_P): Ditto.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 44995)
+++ include/ruby/ruby.h	(revision 44996)
@@ -1069,6 +1069,10 @@ struct RStruct { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1069
 #define RSTRUCT_SET(st, idx, v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
 #define RSTRUCT_GET(st, idx)    (RSTRUCT_CONST_PTR(st)[idx])
 
+#define RBIGNUM_SIGN(b) (FIX2INT(rb_big_cmp((b), INT2FIX(0))) >= 0)
+#define RBIGNUM_POSITIVE_P(b) (FIX2INT(rb_big_cmp((b), INT2FIX(0))) >= 0)
+#define RBIGNUM_NEGATIVE_P(b) (FIX2INT(rb_big_cmp((b), INT2FIX(0))) < 0)
+
 #define R_CAST(st)   (struct st*)
 #define RBASIC(obj)  (R_CAST(RBasic)(obj))
 #define ROBJECT(obj) (R_CAST(RObject)(obj))
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44995)
+++ ChangeLog	(revision 44996)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Feb 16 14:33:52 2014  Tanaka Akira  <akr@f...>
+
+	* include/ruby/ruby.h (RBIGNUM_SIGN): Defined for compatibility.
+	  (RBIGNUM_POSITIVE_P): Ditto.
+	  (RBIGNUM_NEGATIVE_P): Ditto.
+
 Sun Feb 16 12:46:47 2014  Eric Wong  <e@8...>
 
 	* io.c (rb_f_backquote): trade volatile for manual recycle

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

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