Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
WIP keep immortals in arrays asis
Browse files Browse the repository at this point in the history
i.e. -e"print [!0]->[0]"
See GH #413
Does not work ye
  • Loading branch information
rurban committed May 17, 2020
1 parent 73cbb17 commit 93246ab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4262,6 +4262,16 @@ Perl_sv_setsv_flags(pTHX_ SV *dstr, SV* sstr, const I32 flags)

if (UNLIKELY( !sstr ))
sstr = UNDEF;
/* keep most immortals asis. cperl only. Ony any other flag then here do copy it though. */
if (SvIMMORTAL(sstr) && !(flags & ~(SV_GMAGIC|
SV_CONST_RETURN|
SV_UTF8_NO_ENCODING|
SV_DO_COW_SVSETSV|
SV_NOSTEAL)))
{
dstr = sstr;
return;
}

stype = SvTYPE(sstr);
dtype = SvTYPE(dstr);
Expand Down

0 comments on commit 93246ab

Please sign in to comment.