From e03e82a04dda6a44b815f3367c69afb0e953dc91 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Thu, 24 Nov 2016 09:40:44 +0000 Subject: add sv_set_undef() API function This function is equivalent to sv_setsv(sv, &PL_sv_undef), but more efficient. Also change the obvious places in the core to use the new idiom. --- pp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pp.c') diff --git a/pp.c b/pp.c index ce589a0858..d406ee11fe 100644 --- a/pp.c +++ b/pp.c @@ -3249,7 +3249,7 @@ PP(pp_length) } } else { if (!SvPADTMP(TARG)) { - sv_setsv_nomg(TARG, &PL_sv_undef); + sv_set_undef(TARG); } else { /* TARG is on stack at this point and is overwriten by SETs. This branch is the odd one out, so put TARG by default on stack earlier to let local SP go out of liveness sooner */ -- cgit v1.2.1