From: Malcolm Beattie Date: Fri, 3 Oct 1997 15:23:25 +0000 (+0000) Subject: Back out sv_bless3 change which made pp_bless zap '~'-magic. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5d3fdfebb3d34f909dfbefe2c2cdf38bab171cf9;p=p5sagit%2Fp5-mst-13.2.git Back out sv_bless3 change which made pp_bless zap '~'-magic. p4raw-id: //depot/perl@104 --- diff --git a/global.sym b/global.sym index cde9997..a51b822 100644 --- a/global.sym +++ b/global.sym @@ -1098,7 +1098,6 @@ sv_2uv sv_add_arena sv_backoff sv_bless -sv_bless3 sv_catpvf sv_catpv sv_catpvn diff --git a/pp.c b/pp.c index bc0d623..83ca0e5 100644 --- a/pp.c +++ b/pp.c @@ -426,7 +426,7 @@ PP(pp_bless) else stash = gv_stashsv(POPs, TRUE); - (void)sv_bless3(TOPs, stash, TRUE); + (void)sv_bless(TOPs, stash); RETURN; } diff --git a/proto.h b/proto.h index 866e754..cfcbb52 100644 --- a/proto.h +++ b/proto.h @@ -465,7 +465,6 @@ UV sv_2uv _((SV* sv)); void sv_add_arena _((char* ptr, U32 size, U32 flags)); int sv_backoff _((SV* sv)); SV* sv_bless _((SV* sv, HV* stash)); -SV* sv_bless3 _((SV* sv, HV* stash, bool zaptilde)); void sv_catpvf _((SV* sv, const char* pat, ...)); void sv_catpv _((SV* sv, char* ptr)); void sv_catpvn _((SV* sv, char* ptr, STRLEN len)); diff --git a/sv.c b/sv.c index e4214c6..0f5c107 100644 --- a/sv.c +++ b/sv.c @@ -4054,14 +4054,9 @@ I32 n; } SV* -#ifndef CAN_PROTOTYPE -sv_bless3(sv,stash,zaptilde) +sv_bless(sv,stash) SV* sv; HV* stash; -bool zaptilde; -#else -sv_bless3(SV *sv, HV *stash, bool zaptilde) -#endif /* CAN_PROTOTYPE */ { dTHR; SV *ref; @@ -4074,8 +4069,6 @@ sv_bless3(SV *sv, HV *stash, bool zaptilde) 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)); } } @@ -4095,14 +4088,6 @@ sv_bless3(SV *sv, HV *stash, bool zaptilde) return sv; } -SV* -sv_bless(sv,stash) -SV* sv; -HV* stash; -{ - return sv_bless3(sv, stash, FALSE); -} - static void sv_unglob(sv) SV* sv;