return 0;
}
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT)) {
+ if (is_utf8) {
STRLEN tmplen = klen;
/* Just casting the &klen to (STRLEN) won't work well
* if STRLEN and I32 are of different widths. --jhi */
keysave = key = SvPV(keysv, klen);
is_utf8 = (SvUTF8(keysv)!=0);
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT))
+ if (is_utf8)
key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);
if (!hash)
#endif
}
}
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT)) {
+ if (is_utf8) {
STRLEN tmplen = klen;
/* See the note in hv_fetch(). --jhi */
key = (char*)bytes_from_utf8((U8*)key, &tmplen, &is_utf8);
keysave = key = SvPV(keysv, klen);
is_utf8 = (SvUTF8(keysv) != 0);
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT))
+ if (is_utf8)
key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);
if (!hash)
if (!xhv->xhv_array /* !HvARRAY(hv) */)
return Nullsv;
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT)) {
+ if (is_utf8) {
STRLEN tmplen = klen;
/* See the note in hv_fetch(). --jhi */
key = (char*)bytes_from_utf8((U8*)key, &tmplen, &is_utf8);
keysave = key = SvPV(keysv, klen);
is_utf8 = (SvUTF8(keysv) != 0);
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT))
+ if (is_utf8)
key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);
if (!hash)
return 0;
#endif
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT)) {
+ if (is_utf8) {
STRLEN tmplen = klen;
/* See the note in hv_fetch(). --jhi */
key = (char*)bytes_from_utf8((U8*)key, &tmplen, &is_utf8);
keysave = key = SvPV(keysv, klen);
is_utf8 = (SvUTF8(keysv) != 0);
- if (is_utf8 && !(PL_hints & HINT_UTF8_DISTINCT))
+ if (is_utf8)
key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);
if (!hash)
PERL_HASH(hash, key, klen);
const char *save = str;
if (len < 0) {
- len = -len;
+ STRLEN tmplen = -len;
is_utf8 = TRUE;
- if (!(PL_hints & HINT_UTF8_DISTINCT)) {
- STRLEN tmplen = len;
- /* See the note in hv_fetch(). --jhi */
- str = (char*)bytes_from_utf8((U8*)str, &tmplen, &is_utf8);
- len = tmplen;
- }
+ /* See the note in hv_fetch(). --jhi */
+ str = (char*)bytes_from_utf8((U8*)str, &tmplen, &is_utf8);
+ len = tmplen;
}
/* what follows is the moral equivalent of:
const char *save = str;
if (len < 0) {
- len = -len;
+ STRLEN tmplen = -len;
is_utf8 = TRUE;
- if (!(PL_hints & HINT_UTF8_DISTINCT)) {
- STRLEN tmplen = len;
- /* See the note in hv_fetch(). --jhi */
- str = (char*)bytes_from_utf8((U8*)str, &tmplen, &is_utf8);
- len = tmplen;
- }
+ /* See the note in hv_fetch(). --jhi */
+ str = (char*)bytes_from_utf8((U8*)str, &tmplen, &is_utf8);
+ len = tmplen;
}
/* what follows is the moral equivalent of: