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

Make the return type of rb_char_next the same as CharNext

This commit is contained in:
Nobuyoshi Nakada 2021-04-08 21:26:10 +09:00
parent b0b3022f95
commit 0395aa6bbb
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -303,14 +303,14 @@ VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, l
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
# ifdef HAVE_MBLEN
# define CharNext(p) rb_char_next(p)
static inline const char *
static inline char *
rb_char_next(const char *p)
{
if (p) {
int len = mblen(p, RUBY_MBCHAR_MAXSIZE);
p += len > 0 ? len : 1;
}
return p;
return (char *)p;
}
# else
# define CharNext(p) ((p) + 1)