summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-10-15 11:16:14 +0100
committerDavid Mitchell <davem@iabyn.com>2016-02-03 08:59:42 +0000
commit796464187416d7ed9e48c8ce9a8dffeeba5b8240 (patch)
treee785c4f49d5ca6581ee0c679328a59ae82058f74 /sv.c
parent72c5b62dfd0d91a02743d4b2fe0d8b8d04488753 (diff)
downloadperl-796464187416d7ed9e48c8ce9a8dffeeba5b8240.tar.gz
sort(!) out CXt_NULL and CXp_MULTICALL
A sort BLOCK is done using a CXt_NULL context type. Currently it has the CXp_MULTICALL flag set. Remove this flag so that CXp_MULTICALL is only set on CXt_SUB contexts. Also add code comments in various places explainging that CXt_NULL is likely to a sort BLOCK, and fix the comments in pp_return which said a particular code path was only taken by sort BLOCK; it's also taken be (?{...}) too.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index 87c48ac8a8..558ecd5a57 100644
--- a/sv.c
+++ b/sv.c
@@ -16292,13 +16292,10 @@ Perl_report_uninit(pTHX_ const SV *uninit_sv)
sv_insert(varname, 0, 0, " ", 1);
}
}
- else if (PL_curstackinfo->si_type == PERLSI_SORT
- && CxMULTICALL(&cxstack[cxstack_ix]))
- {
+ else if (PL_curstackinfo->si_type == PERLSI_SORT && cxstack_ix == 0)
/* we've reached the end of a sort block or sub,
* and the uninit value is probably what that code returned */
desc = "sort";
- }
/* PL_warn_uninit_sv is constant */
GCC_DIAG_IGNORE(-Wformat-nonliteral);