1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* trunk/ext/-test-/printf/printf.c: change function names because of

conflict with msvcrt.  fixed build error of mswin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-05-25 07:13:03 +00:00
parent 9a66f6f07e
commit 67075af600
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Fri May 25 16:11:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* 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@atdot.net>
* vm.c: refactoring backtrace related funcitons.

View file

@ -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 @@ printf_i(VALUE self, VALUE obj)
}
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 @@ void
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);
}