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

Adjust types to rb_enc_left_char_head

I dislike unnatural casts.
This commit is contained in:
Nobuyoshi Nakada 2021-10-05 17:14:29 +09:00
parent a15996c752
commit cd182c5ee1
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
2 changed files with 5 additions and 6 deletions

View file

@ -694,7 +694,7 @@ rb_enc_prev_char(const char *s, const char *p, const char *e, const rb_encoding
* @return Pointer to the head of the character that contains `p`.
*/
static inline char *
rb_enc_left_char_head(const char *s, const void *p, const char *e, const rb_encoding *enc)
rb_enc_left_char_head(const char *s, const char *p, const char *e, const rb_encoding *enc)
{
const OnigUChar *us = RBIMPL_CAST((const OnigUChar *)s);
const OnigUChar *up = RBIMPL_CAST((const OnigUChar *)p);