mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1,
rb_nkf_guess2): Silence warnings regarding char * vs. unsigned char * mismatch; submitted by Lyle Johnson <lyle.johnson@gmail.com> in [ruby-core:10416]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
43281c7297
commit
42c647f6fc
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
Tue Feb 27 19:26:31 2007 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1,
|
||||
rb_nkf_guess2): Silence warnings regarding char * vs. unsigned
|
||||
char * mismatch; submitted by Lyle Johnson
|
||||
<lyle.johnson@gmail.com> in [ruby-core:10416].
|
||||
|
||||
Tue Feb 27 19:15:01 2007 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/base64.rb (Base64::b64encode): Fix documentation; submitted
|
||||
|
|
|
@ -62,7 +62,7 @@ rb_nkf_putchar(unsigned int c)
|
|||
o_len += incsize;
|
||||
rb_str_resize(result, o_len);
|
||||
incsize *= 2;
|
||||
output = RSTRING_PTR(result);
|
||||
output = (unsigned char *)RSTRING_PTR(result);
|
||||
}
|
||||
output[output_ctr++] = c;
|
||||
|
||||
|
@ -155,13 +155,13 @@ rb_nkf_kconv(VALUE obj, VALUE opt, VALUE src)
|
|||
|
||||
input_ctr = 0;
|
||||
StringValue(src);
|
||||
input = RSTRING_PTR(src);
|
||||
input = (unsigned char *)RSTRING_PTR(src);
|
||||
i_len = RSTRING_LEN(src);
|
||||
result = rb_str_new(0, i_len*3 + 10);
|
||||
v = result;
|
||||
|
||||
output_ctr = 0;
|
||||
output = RSTRING_PTR(result);
|
||||
output = (unsigned char *)RSTRING_PTR(result);
|
||||
o_len = RSTRING_LEN(result);
|
||||
*output = '\0';
|
||||
|
||||
|
@ -208,7 +208,7 @@ rb_nkf_guess1(VALUE obj, VALUE src)
|
|||
int sequence_counter = 0;
|
||||
|
||||
StringValue(src);
|
||||
p = RSTRING_PTR(src);
|
||||
p = (unsigned char *)RSTRING_PTR(src);
|
||||
pend = p + RSTRING_LEN(src);
|
||||
if (p == pend) return INT2FIX(_UNKNOWN);
|
||||
|
||||
|
@ -324,7 +324,7 @@ rb_nkf_guess2(VALUE obj, VALUE src)
|
|||
|
||||
input_ctr = 0;
|
||||
StringValue(src);
|
||||
input = RSTRING_PTR(src);
|
||||
input = (unsigned char *)RSTRING_PTR(src);
|
||||
i_len = RSTRING_LEN(src);
|
||||
|
||||
if(x0201_f == WISH_TRUE)
|
||||
|
|
Loading…
Add table
Reference in a new issue