diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-09 03:51:01 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-03-09 03:51:01 +0000 |
commit | 4e4c362ec2e3f4b5f5c23aa83a26a13b85d0c2c1 (patch) | |
tree | a06b5a015a32d7281f7b1e82ee2ed810c0af86ae /hv.c | |
parent | 9404a519907ec8d9bce4b0bf7a09103f1f9f6fcb (diff) | |
download | perl-4e4c362ec2e3f4b5f5c23aa83a26a13b85d0c2c1.tar.gz |
[win32] merge C<local $tied{foo}> patch, also moved statics in
[ah]v.c to thrdvar.h
p4raw-id: //depot/win32/perl@802
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -94,8 +94,8 @@ hv_fetch(HV *hv, char *key, U32 klen, I32 lval) dTHR; sv = sv_newmortal(); mg_copy((SV*)hv, sv, key, klen); - Sv = sv; - return &Sv; + hv_fetch_sv = sv; + return &hv_fetch_sv; } #ifdef ENV_IS_CASELESS else if (mg_find((SV*)hv,'E')) { @@ -170,19 +170,17 @@ hv_fetch_ent(HV *hv, SV *keysv, I32 lval, register U32 hash) if (SvRMAGICAL(hv)) { if (mg_find((SV*)hv,'P')) { - static HE mh; - sv = sv_newmortal(); keysv = sv_2mortal(newSVsv(keysv)); mg_copy((SV*)hv, sv, (char*)keysv, HEf_SVKEY); - if (!HeKEY_hek(&mh)) { + if (!HeKEY_hek(&hv_fetch_ent_mh)) { char *k; New(54, k, HEK_BASESIZE + sizeof(SV*), char); - HeKEY_hek(&mh) = (HEK*)k; + HeKEY_hek(&hv_fetch_ent_mh) = (HEK*)k; } - HeSVKEY_set(&mh, keysv); - HeVAL(&mh) = sv; - return &mh; + HeSVKEY_set(&hv_fetch_ent_mh, keysv); + HeVAL(&hv_fetch_ent_mh) = sv; + return &hv_fetch_ent_mh; } #ifdef ENV_IS_CASELESS else if (mg_find((SV*)hv,'E')) { |