summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-09-18 13:43:12 +0100
committerDavid Mitchell <davem@iabyn.com>2019-09-19 08:42:46 +0100
commitab71cf5aa51e7549e9fbcd876571610f3ba84ef5 (patch)
tree771011fe86707b191952ae96d78c105c6ef31406 /inline.h
parent91c3b9cb4c0600d1f8d6862715179da11a4864c6 (diff)
downloadperl-ab71cf5aa51e7549e9fbcd876571610f3ba84ef5.tar.gz
Perl_gimme_V(): assume caller always provides cxt
So we don't need to check whether (cxstack[cxix].blk_gimme & G_WANT), just use it. Replace the check with an assertion.
Diffstat (limited to 'inline.h')
-rw-r--r--inline.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/inline.h b/inline.h
index 1755893dbc..f52d4e5620 100644
--- a/inline.h
+++ b/inline.h
@@ -2069,11 +2069,8 @@ Perl_gimme_V(pTHX)
cxix = PL_curstackinfo->si_cxsubix;
if (cxix < 0)
return G_VOID;
- gimme = (cxstack[cxix].blk_gimme & G_WANT);
- if (gimme)
- return gimme;
- /* use the full sub to report the error */
- return block_gimme();
+ assert(cxstack[cxix].blk_gimme & G_WANT);
+ return (cxstack[cxix].blk_gimme & G_WANT);
}