isutf8 = SvUTF8(sv);
if (!isutf8) {
U8 *t = s, *e = s + len;
- while (t < e)
- if ((hibit = !UTF8_IS_INVARIANT(*t++)))
+ while (t < e) {
+ U8 ch = *t++;
+ if ((hibit = !NATIVE_IS_INVARIANT(ch)))
break;
+ }
if (hibit)
s = bytes_to_utf8(s, &len);
}
s = (U8*)SvPV(sv, len);
if (!SvUTF8(sv)) {
U8 *t = s, *e = s + len;
- while (t < e)
- if ((hibit = !UTF8_IS_INVARIANT(*t++)))
+ while (t < e) {
+ U8 ch = *t++;
+ if ((hibit = !NATIVE_IS_INVARIANT(ch)))
break;
+ }
if (hibit)
start = s = bytes_to_utf8(s, &len);
}
isutf8 = SvUTF8(sv);
if (!isutf8) {
U8 *t = s, *e = s + len;
- while (t < e)
- if ((hibit = !UTF8_IS_INVARIANT(*t++)))
+ while (t < e) {
+ U8 ch = *t++;
+ if ((hibit = !NATIVE_IS_INVARIANT(ch)))
break;
+ }
if (hibit)
s = bytes_to_utf8(s, &len);
}