mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* regex.c (calculate_must_string, slow_search, re_search): Silence
warnings regarding char * vs. unsigned char * mismatch; submitted by Lyle Johnson <lyle.johnson@gmail.com> in [ruby-core:10416]. * ext/bigdecimal/bigdecimal.c (BigDecimal_load): Ditto. * ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto. * ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto. * ext/digest/digest.c (rb_digest_base_finish, rb_digest_base_update): Ditto. * ext/nkf/nkf.c (rb_str_resize, rb_nkf_kconv, rb_nkf_guess1, rb_nkf_guess2): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8e062b44bd
commit
5a9a84efe7
7 changed files with 39 additions and 20 deletions
|
|
@ -63,7 +63,7 @@ rb_nkf_putchar(c)
|
|||
o_len += incsize;
|
||||
rb_str_resize(result, o_len);
|
||||
incsize *= 2;
|
||||
output = RSTRING(result)->ptr;
|
||||
output = (unsigned char *)RSTRING(result)->ptr;
|
||||
}
|
||||
output[output_ctr++] = c;
|
||||
|
||||
|
|
@ -158,13 +158,13 @@ rb_nkf_kconv(obj, opt, src)
|
|||
|
||||
input_ctr = 0;
|
||||
StringValue(src);
|
||||
input = RSTRING(src)->ptr;
|
||||
input = (unsigned char *)RSTRING(src)->ptr;
|
||||
i_len = RSTRING(src)->len;
|
||||
result = rb_str_new(0, i_len*3 + 10);
|
||||
v = result;
|
||||
|
||||
output_ctr = 0;
|
||||
output = RSTRING(result)->ptr;
|
||||
output = (unsigned char *)RSTRING(result)->ptr;
|
||||
o_len = RSTRING(result)->len;
|
||||
*output = '\0';
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ rb_nkf_guess1(obj, src)
|
|||
int sequence_counter = 0;
|
||||
|
||||
StringValue(src);
|
||||
p = RSTRING(src)->ptr;
|
||||
p = (unsigned char *)RSTRING(src)->ptr;
|
||||
pend = p + RSTRING(src)->len;
|
||||
if (p == pend) return INT2FIX(_UNKNOWN);
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ rb_nkf_guess2(obj, src)
|
|||
|
||||
input_ctr = 0;
|
||||
StringValue(src);
|
||||
input = RSTRING(src)->ptr;
|
||||
input = (unsigned char *)RSTRING(src)->ptr;
|
||||
i_len = RSTRING(src)->len;
|
||||
|
||||
if(x0201_f == WISH_TRUE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue