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

* enc/unicode.c: fix implicit conversion error with clang. fixup r53548.

* string.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2016-01-16 01:51:58 +00:00
parent 203e604f46
commit 219467abde
3 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Jan 16 10:51:19 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* enc/unicode.c: fix implicit conversion error with clang. fixup r53548.
* string.c: ditto.
Sat Jan 16 10:31:00 2016 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* common.mk: test-sample was changed to test-basic.

View file

@ -630,5 +630,5 @@ onigenc_unicode_case_map(OnigCaseFoldType* flags,
}
to += ONIGENC_CODE_TO_MBC(enc, code, to);
}
return to-to_start;
return (int)(to-to_start);
}

View file

@ -5672,7 +5672,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
while (source_current < source_end) {
/* increase multiplier using buffer count to converge quickly */
int capa = (source_end-source_current)*++buffer_count + CASE_MAPPING_ADDITIONAL_LENGTH;
int capa = (int)(source_end-source_current)*++buffer_count + CASE_MAPPING_ADDITIONAL_LENGTH;
current_buffer->next = (mapping_buffer*)ALLOC_N(char, sizeof(mapping_buffer)+capa);
current_buffer = current_buffer->next;
current_buffer->next = NULL;