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

ruby-changes:15864

From: nobu <ko1@a...>
Date: Sat, 15 May 2010 17:16:46 +0900 (JST)
Subject: [ruby-changes:15864] Ruby:r27800 (ruby_1_8, trunk, ruby_1_9_2): * ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if

nobu	2010-05-15 17:16:18 +0900 (Sat, 15 May 2010)

  New Revision: 27800

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

  Log:
    * ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if
      errno is not set.  [ruby-dev:41317]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/ext/iconv/iconv.c
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/ext/iconv/iconv.c
    branches/ruby_1_9_2/version.h
    trunk/ChangeLog
    trunk/ext/iconv/iconv.c
    trunk/version.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27799)
+++ ChangeLog	(revision 27800)
@@ -1,3 +1,8 @@
+Sat May 15 17:16:15 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if
+	  errno is not set.  [ruby-dev:41317]
+
 Fri May 14 07:27:07 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* marshal.c (w_float): strip ".0" from end for rubyspec.
Index: ext/iconv/iconv.c
===================================================================
--- ext/iconv/iconv.c	(revision 27799)
+++ ext/iconv/iconv.c	(revision 27800)
@@ -173,6 +173,18 @@
     return StringValuePtr(*code);
 }
 
+NORETURN(static void rb_iconv_sys_fail(const char *s));
+static void
+rb_iconv_sys_fail(const char *s)
+{
+    if (errno == 0) {
+	rb_raise(rb_eIconvBrokenLibrary, "%s", s);
+    }
+    rb_sys_fail(s);
+}
+
+#define rb_sys_fail(s) rb_iconv_sys_fail(s)
+
 static iconv_t
 iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt, int *idx)
 {
Index: version.h
===================================================================
--- version.h	(revision 27799)
+++ version.h	(revision 27800)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.3"
-#define RUBY_RELEASE_DATE "2010-05-14"
+#define RUBY_RELEASE_DATE "2010-05-15"
 #define RUBY_PATCHLEVEL -1
 #define RUBY_BRANCH_NAME "trunk"
 
@@ -8,7 +8,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2010
 #define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 14
+#define RUBY_RELEASE_DAY 15
 
 #include "ruby/version.h"
 
Index: ruby_1_8/ext/iconv/iconv.c
===================================================================
--- ruby_1_8/ext/iconv/iconv.c	(revision 27799)
+++ ruby_1_8/ext/iconv/iconv.c	(revision 27800)
@@ -146,6 +146,18 @@
     return StringValuePtr(*code);
 }
 
+NORETURN(static void rb_iconv_sys_fail(const char *s));
+static void
+rb_iconv_sys_fail(const char *s)
+{
+    if (errno == 0) {
+	rb_raise(rb_eIconvBrokenLibrary, "%s", s);
+    }
+    rb_sys_fail(s);
+}
+
+#define rb_sys_fail(s) rb_iconv_sys_fail(s)
+
 static iconv_t
 iconv_create
 #ifdef HAVE_PROTOTYPES
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 27799)
+++ ruby_1_8/ChangeLog	(revision 27800)
@@ -1,3 +1,8 @@
+Sat May 15 17:16:15 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if
+	  errno is not set.  [ruby-dev:41317]
+
 Sat May 15 12:36:01 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* Makefile.in, common.mk, win32/Makefile.sub (REVISION_H): move
Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 27799)
+++ ruby_1_9_2/ChangeLog	(revision 27800)
@@ -1,3 +1,8 @@
+Sat May 15 17:16:15 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* ext/iconv/iconv.c (rb_iconv_sys_fail): raise BrokenLibrary if
+	  errno is not set.  [ruby-dev:41317]
+
 Thu May 13 18:20:16 2010  NAKAMURA Usaku  <usa@r...>
 
 	* io.c (swallow): should use more_char() instead of fill_cbuf().
Index: ruby_1_9_2/ext/iconv/iconv.c
===================================================================
--- ruby_1_9_2/ext/iconv/iconv.c	(revision 27799)
+++ ruby_1_9_2/ext/iconv/iconv.c	(revision 27800)
@@ -173,6 +173,18 @@
     return StringValuePtr(*code);
 }
 
+NORETURN(static void rb_iconv_sys_fail(const char *s));
+static void
+rb_iconv_sys_fail(const char *s)
+{
+    if (errno == 0) {
+	rb_raise(rb_eIconvBrokenLibrary, "%s", s);
+    }
+    rb_sys_fail(s);
+}
+
+#define rb_sys_fail(s) rb_iconv_sys_fail(s)
+
 static iconv_t
 iconv_create(VALUE to, VALUE from, struct rb_iconv_opt_t *opt, int *idx)
 {
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 27799)
+++ ruby_1_9_2/version.h	(revision 27800)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-05-14"
+#define RUBY_RELEASE_DATE "2010-05-15"
 #define RUBY_PATCHLEVEL -1
 
 #define RUBY_VERSION_MAJOR 1
@@ -7,7 +7,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2010
 #define RUBY_RELEASE_MONTH 5
-#define RUBY_RELEASE_DAY 14
+#define RUBY_RELEASE_DAY 15
 
 #include "ruby/version.h"
 

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

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