Skip to content

Instantly share code, notes, and snippets.

@nullkal
Created July 13, 2015 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nullkal/cff9244e2dcc9b4fead6 to your computer and use it in GitHub Desktop.
Save nullkal/cff9244e2dcc9b4fead6 to your computer and use it in GitHub Desktop.
https://bugs.ruby-lang.org/issues/11065 のRuby 2.2.2用パッチ
From ead74bca51c4cccec09219a36dd316970f2eda1a Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Tue, 14 Apr 2015 02:25:27 +0000
Subject: [PATCH] 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
---
ext/-test-/printf/printf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c
index ef7570f..666f559 100644
--- a/ext/-test-/printf/printf.c
+++ b/ext/-test-/printf/printf.c
@@ -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;
--
2.4.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment