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

ruby-changes:11313

From: nobu <ko1@a...>
Date: Fri, 13 Mar 2009 17:04:23 +0900 (JST)
Subject: [ruby-changes:11313] Ruby:r22926 (trunk): * include/ruby/ruby.h (bool): not define to get rid of conflict

nobu	2009-03-13 17:04:11 +0900 (Fri, 13 Mar 2009)

  New Revision: 22926

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

  Log:
    * include/ruby/ruby.h (bool): not define to get rid of conflict
      against curses.

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

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 22925)
+++ include/ruby/ruby.h	(revision 22926)
@@ -309,28 +309,6 @@
     RUBY_SPECIAL_SHIFT  = 8
 };
 
-#if defined HAVE_STDBOOL_H
-# include <stdbool.h>
-#elif defined __cplusplus
-typedef bool _Bool;
-#else
-# ifndef HAVE__BOOL
-#   define _Bool signed char
-# endif
-# ifndef bool
-#   define bool _Bool
-# endif
-# ifndef false
-#   define false 0
-# endif
-# ifndef true
-#   define true 1
-# endif
-# ifndef __bool_true_false_are_defined
-#   define __bool_true_false_are_defined 1
-# endif
-#endif
-
 #define Qfalse ((VALUE)RUBY_Qfalse)
 #define Qtrue  ((VALUE)RUBY_Qtrue)
 #define Qnil   ((VALUE)RUBY_Qnil)
@@ -1171,8 +1149,8 @@
 static inline int
 rb_special_const_p(VALUE obj)
 {
-    if (SPECIAL_CONST_P(obj)) return true;
-    return false;
+    if (SPECIAL_CONST_P(obj)) return (int)Qtrue;
+    return (int)Qfalse;
 }
 
 #include "ruby/missing.h"
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 22925)
+++ ChangeLog	(revision 22926)
@@ -1,3 +1,8 @@
+Fri Mar 13 17:04:09 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/ruby.h (bool): not define to get rid of conflic
+	  against curses.
+
 Fri Mar 13 16:45:33 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/openssl/openssl_missing.h (i2d_of_void): cast for callbacks.
@@ -21,7 +26,7 @@
 
 Fri Mar 13 10:42:19 2009  Nobuyoshi Nakada  <nobu@r...>
 
-	* configure.in (AC_HEADER_DIRENT): added.
+	* configure.in (AC_HEADER_STDBOOL): added.
 
 	* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true
 	  and false instead of Qtrue and Qfalse for platforms where VALUE

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

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