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:
parent
b0b3022f95
commit
0395aa6bbb
1 changed files with 2 additions and 2 deletions
|
@ -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. */
|
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
|
||||||
# ifdef HAVE_MBLEN
|
# ifdef HAVE_MBLEN
|
||||||
# define CharNext(p) rb_char_next(p)
|
# define CharNext(p) rb_char_next(p)
|
||||||
static inline const char *
|
static inline char *
|
||||||
rb_char_next(const char *p)
|
rb_char_next(const char *p)
|
||||||
{
|
{
|
||||||
if (p) {
|
if (p) {
|
||||||
int len = mblen(p, RUBY_MBCHAR_MAXSIZE);
|
int len = mblen(p, RUBY_MBCHAR_MAXSIZE);
|
||||||
p += len > 0 ? len : 1;
|
p += len > 0 ? len : 1;
|
||||||
}
|
}
|
||||||
return p;
|
return (char *)p;
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
# define CharNext(p) ((p) + 1)
|
# define CharNext(p) ((p) + 1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue