From 5112a548467e04ebdb386f0cc7bacb29f38d3fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Wed, 29 Sep 2021 12:58:26 +0900 Subject: include/ruby/encoding.h: convert macros into inline functions Less macros == huge win. --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') 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); -- cgit v1.2.3