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

ruby-changes:10019

From: yugui <ko1@a...>
Date: Fri, 16 Jan 2009 00:40:20 +0900 (JST)
Subject: [ruby-changes:10019] Ruby:r21562 (ruby_1_9_1): merges r21510 from trunk into ruby_1_9_1.

yugui	2009-01-16 00:39:30 +0900 (Fri, 16 Jan 2009)

  New Revision: 21562

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

  Log:
    merges r21510 from trunk into ruby_1_9_1.
    * gc.c (negative_size_allocation_error_with_gvl): abolish a warning.
      (negative_size_allocation_error): ditto.
    * ext/openssl/ossl.c (ossl_raise): ditto.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/ext/openssl/ossl.c
    branches/ruby_1_9_1/gc.c

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21561)
+++ ruby_1_9_1/ChangeLog	(revision 21562)
@@ -1,3 +1,10 @@
+Wed Jan 14 22:38:30 2009  Tanaka Akira  <akr@f...>
+
+	* gc.c (negative_size_allocation_error_with_gvl): abolish a warning.
+	  (negative_size_allocation_error): ditto.
+
+	* ext/openssl/ossl.c (ossl_raise): ditto.
+
 Thu Jan 15 13:10:58 2009  NAKAMURA Usaku  <usa@r...>
 
 	* win32/Makefile.sub (COMPILERFLAG): for enc/trans/gb18030.c.
Index: ruby_1_9_1/gc.c
===================================================================
--- ruby_1_9_1/gc.c	(revision 21561)
+++ ruby_1_9_1/gc.c	(revision 21562)
@@ -558,7 +558,7 @@
 static void *
 negative_size_allocation_error_with_gvl(void *ptr)
 {
-    rb_raise(rb_eNoMemError, (const char *)ptr);
+    rb_raise(rb_eNoMemError, "%s", (const char *)ptr);
     return 0; /* should not be reached */
 }
 
@@ -566,7 +566,7 @@
 negative_size_allocation_error(const char *msg)
 {
     if (ruby_thread_has_gvl_p()) {
-	rb_raise(rb_eNoMemError, msg);
+	rb_raise(rb_eNoMemError, "%s", msg);
     }
     else {
 	if (ruby_native_thread_p()) {
Index: ruby_1_9_1/ext/openssl/ossl.c
===================================================================
--- ruby_1_9_1/ext/openssl/ossl.c	(revision 21561)
+++ ruby_1_9_1/ext/openssl/ossl.c	(revision 21562)
@@ -296,8 +296,7 @@
 	    msg = ERR_error_string(e, NULL);
 	else
 	    msg = ERR_reason_error_string(e);
-	fmt = len ? ": %s" : "%s";
-	len += snprintf(buf+len, BUFSIZ-len, fmt, msg);
+	len += snprintf(buf+len, BUFSIZ-len, "%s%s", (len ? ": " : ""), msg);
     }
     if (dOSSL == Qtrue){ /* show all errors on the stack */
 	while ((e = ERR_get_error()) != 0){

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

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