diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-09-29 16:57:23 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-09-29 16:57:23 +0000 |
commit | 2ddcc7aa6c936ba8e7a9703319dfd8959bb54574 (patch) | |
tree | b71ca26eb63d153ac3532c533e89b09266239001 /sv.c | |
parent | 8f95159f0f6f551c08c5f6e1a4d8807b332bc21a (diff) | |
download | perl-2ddcc7aa6c936ba8e7a9703319dfd8959bb54574.tar.gz |
Re-introduce the changes from change 68 (runops becomes a
function pointer and sv_bless3 for '~'-magic) which got lost
during the preparation for the maint-merge.
p4raw-id: //depot/perl@78
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -4043,9 +4043,10 @@ I32 n; } SV* -sv_bless(sv,stash) +sv_bless3(sv,stash,zaptilde) SV* sv; HV* stash; +bool zaptilde; { dTHR; SV *ref; @@ -4058,6 +4059,8 @@ HV* stash; if (SvOBJECT(ref)) { if (SvTYPE(ref) != SVt_PVIO) --sv_objcount; + if (zaptilde && SvRMAGICAL(ref)) + sv_unmagic(ref, '~'); /* stop cross-class pointer forgery */ SvREFCNT_dec(SvSTASH(ref)); } } @@ -4077,6 +4080,14 @@ HV* stash; return sv; } +SV* +sv_bless(sv,stash) +SV* sv; +HV* stash; +{ + return sv_bless3(sv, stash, FALSE); +} + static void sv_unglob(sv) SV* sv; |