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

ruby-changes:23738

From: usa <ko1@a...>
Date: Fri, 25 May 2012 16:13:16 +0900 (JST)
Subject: [ruby-changes:23738] usa:r35789 (trunk): * trunk/ext/-test-/printf/printf.c: change function names because of

usa	2012-05-25 16:13:03 +0900 (Fri, 25 May 2012)

  New Revision: 35789

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

  Log:
    * trunk/ext/-test-/printf/printf.c: change function names because of
      conflict with msvcrt.  fixed build error of mswin.

  Modified files:
    trunk/ChangeLog
    trunk/ext/-test-/printf/printf.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 35788)
+++ ChangeLog	(revision 35789)
@@ -1,3 +1,8 @@
+Fri May 25 16:11:27 2012  NAKAMURA Usaku  <usa@r...>
+
+	* trunk/ext/-test-/printf/printf.c: change function names because of
+	  conflict with msvcrt.  fixed build error of mswin.
+
 Fri May 25 10:52:52 2012  Koichi Sasada  <ko1@a...>
 
 	* vm.c: refactoring backtrace related funcitons.
Index: ext/-test-/printf/printf.c
===================================================================
--- ext/-test-/printf/printf.c	(revision 35788)
+++ ext/-test-/printf/printf.c	(revision 35789)
@@ -2,7 +2,7 @@
 #include <ruby/encoding.h>
 
 static VALUE
-printf_i(VALUE self, VALUE obj)
+printf_test_i(VALUE self, VALUE obj)
 {
     char buf[256];
     snprintf(buf, sizeof(buf), "<%"PRIsVALUE">", obj);
@@ -10,13 +10,13 @@
 }
 
 static VALUE
-printf_s(VALUE self, VALUE obj)
+printf_test_s(VALUE self, VALUE obj)
 {
     return rb_enc_sprintf(rb_usascii_encoding(), "<%"PRIsVALUE">", obj);
 }
 
 static VALUE
-printf_v(VALUE self, VALUE obj)
+printf_test_v(VALUE self, VALUE obj)
 {
     return rb_enc_sprintf(rb_usascii_encoding(), "{%+"PRIsVALUE"}", obj);
 }
@@ -25,7 +25,7 @@
 Init_printf(void)
 {
     VALUE m = rb_define_module_under(rb_define_module("Bug"), "Printf");
-    rb_define_singleton_method(m, "i", printf_i, 1);
-    rb_define_singleton_method(m, "s", printf_s, 1);
-    rb_define_singleton_method(m, "v", printf_v, 1);
+    rb_define_singleton_method(m, "i", printf_test_i, 1);
+    rb_define_singleton_method(m, "s", printf_test_s, 1);
+    rb_define_singleton_method(m, "v", printf_test_v, 1);
 }

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

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