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

ruby-changes:17501

From: nobu <ko1@a...>
Date: Fri, 15 Oct 2010 22:57:31 +0900 (JST)
Subject: [ruby-changes:17501] Ruby:r29506 (trunk): * include/ruby/ruby.h (VALUE): prefer long over uintptr_t,

nobu	2010-10-15 22:47:38 +0900 (Fri, 15 Oct 2010)

  New Revision: 29506

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

  Log:
    * include/ruby/ruby.h (VALUE): prefer long over uintptr_t,
      FIX2LONG expects VALUE to be long at least.
    
    * include/ruby/ruby.h (FIX2LONG): parenthesize the argument.

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 29505)
+++ include/ruby/ruby.h	(revision 29506)
@@ -83,7 +83,7 @@
 #  endif
 #endif
 
-#if defined HAVE_UINTPTR_T
+#if defined HAVE_UINTPTR_T && 0
 typedef uintptr_t VALUE;
 typedef uintptr_t ID;
 # define SIGNED_VALUE intptr_t
@@ -313,7 +313,7 @@
 #define NUM2GIDT(v) NUM2LONG(v)
 #endif
 
-#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1)
+#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)(x),1)
 #define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX)
 #define FIXNUM_P(f) (((SIGNED_VALUE)(f))&FIXNUM_FLAG)
 #define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29505)
+++ ChangeLog	(revision 29506)
@@ -1,3 +1,10 @@
+Fri Oct 15 22:47:31 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/ruby.h (VALUE): prefer long over uintptr_t,
+	  FIX2LONG expects VALUE to be long at least.
+
+	* include/ruby/ruby.h (FIX2LONG): parenthesize the argument.
+
 Fri Oct 15 20:30:30 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (dev_t): use RUBY_REPLACE_TYPE.

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

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