summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2021-09-29 12:58:26 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2021-10-05 14:18:23 +0900
commit5112a548467e04ebdb386f0cc7bacb29f38d3fd2 (patch)
treefe56859f6065a23483e7fd3e516f7ec644be2e85 /string.c
parent312668cf031ce5e018f78d6a7cad9bcdcdac6ae6 (diff)
include/ruby/encoding.h: convert macros into inline functions
Less macros == huge win.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4909
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 953716a1ed..80f3358c2c 100644
--- a/string.c
+++ b/string.c
@@ -5738,7 +5738,7 @@ rb_str_setbyte(VALUE str, VALUE index, VALUE value)
ENC_CODERANGE_SET(str, ENC_CODERANGE_VALID);
goto end;
case ENC_CODERANGE_VALID:
- left = rb_enc_left_char_head(head, ptr, head+len, enc);
+ left = rb_enc_left_char_head(head, (char *)ptr, head+len, enc);
width = rb_enc_precise_mbclen(left, head+len, enc);
*ptr = byte;
nlen = rb_enc_precise_mbclen(left, head+len, enc);