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

printf.c: uint_to_str

* ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of
  conflict on cygwin.  [ruby-core:68877] [Bug #11065]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-04-14 02:25:27 +00:00
parent d1fb37bca8
commit 3dba6dabb6
2 changed files with 8 additions and 3 deletions

View file

@ -20,7 +20,7 @@ printf_test_q(VALUE self, VALUE obj)
}
static char *
utoa(char *p, char *e, unsigned int x)
uint_to_str(char *p, char *e, unsigned int x)
{
char *e0 = e;
if (e <= p) return p;
@ -71,12 +71,12 @@ printf_test_call(int argc, VALUE *argv, VALUE self)
*p++ = '0';
}
if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("width"))))) {
p = utoa(p, format + sizeof(format), NUM2UINT(v));
p = uint_to_str(p, format + sizeof(format), NUM2UINT(v));
}
if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
*p++ = '.';
if (FIXNUM_P(v))
p = utoa(p, format + sizeof(format), NUM2UINT(v));
p = uint_to_str(p, format + sizeof(format), NUM2UINT(v));
}
}
*p++ = cnv;