summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-08 21:26:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-08 21:41:00 +0900
commit0395aa6bbb23c2a4c92fbbec87803a9670174d2c (patch)
treef38ccb18cda9698d5862054fbc206dcc9a53d97b
parentb0b3022f95b9ad4f19098b461e461dbb96f8e906 (diff)
Make the return type of rb_char_next the same as CharNext
-rw-r--r--eval_intern.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval_intern.h b/eval_intern.h
index 9fa9031189..3238df1036 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -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)