diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-13 03:36:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-07-13 03:36:22 +0000 |
commit | 77caf834c201d3982a815b3d51794b6e3a769c6d (patch) | |
tree | 31ef7444104242d2bf7eea2f7821bf686fd1a308 /hv.c | |
parent | 434f716607831e7b291d6f6bb7fb9611e6d0f7ca (diff) | |
download | perl-77caf834c201d3982a815b3d51794b6e3a769c6d.tar.gz |
Remove unicode::distinct, as per Inaba Hiroto.
p4raw-id: //depot/perl@11342
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 38 |
1 files changed, 16 insertions, 22 deletions
@@ -199,7 +199,7 @@ Perl_hv_fetch(pTHX_ HV *hv, const char *key, I32 klen, I32 lval) 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 */ @@ -333,7 +333,7 @@ Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, register U32 hash) 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) @@ -447,7 +447,7 @@ Perl_hv_store(pTHX_ HV *hv, const char *key, I32 klen, SV *val, register U32 has #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); @@ -565,7 +565,7 @@ Perl_hv_store_ent(pTHX_ HV *hv, SV *keysv, SV *val, register U32 hash) 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) @@ -675,7 +675,7 @@ Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen, I32 flags) 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); @@ -779,7 +779,7 @@ Perl_hv_delete_ent(pTHX_ HV *hv, SV *keysv, I32 flags, U32 hash) 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) @@ -869,7 +869,7 @@ Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen) 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); @@ -966,7 +966,7 @@ Perl_hv_exists_ent(pTHX_ HV *hv, SV *keysv, U32 hash) 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); @@ -1584,14 +1584,11 @@ Perl_unsharepvn(pTHX_ const char *str, I32 len, U32 hash) 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: @@ -1647,14 +1644,11 @@ Perl_share_hek(pTHX_ const char *str, I32 len, register U32 hash) 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: |