summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-19 16:15:05 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-19 16:30:40 -0800
commitb1dcc8e278f8fb24401a718bd5acc1b867192967 (patch)
tree099240554aaa3362f0f48d0ca67224797dfaea41 /universal.c
parentda39159d3568bc6c07f00643d0677d68705ee94f (diff)
downloadperl-b1dcc8e278f8fb24401a718bd5acc1b867192967.tar.gz
universal.c:re_regexp_pattern: Mention GIMME_V once
While it was only being called once, it occurred in two code paths. Pulling it out of the main if-block reduces the size of universal.o. Before and after: $ ls -l universal.o -rw-r--r-- 1 sprout staff 33700 Dec 19 16:05 universal.o $ ls -l universal.o -rw-r--r-- 1 sprout staff 33692 Dec 19 16:13 universal.o
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/universal.c b/universal.c
index 7e3e93b4f9..2b334ea116 100644
--- a/universal.c
+++ b/universal.c
@@ -903,6 +903,7 @@ XS(XS_re_regexp_pattern)
{
dXSARGS;
REGEXP *re;
+ U8 const gimme = GIMME_V;
EXTEND(SP, 2);
SP -= items;
@@ -925,7 +926,7 @@ XS(XS_re_regexp_pattern)
/* Houston, we have a regex! */
SV *pattern;
- if ( GIMME_V == G_ARRAY ) {
+ if ( gimme == G_ARRAY ) {
STRLEN left = 0;
char reflags[sizeof(INT_PAT_MODS) + MAX_CHARSET_NAME_LENGTH];
const char *fptr;
@@ -977,7 +978,7 @@ XS(XS_re_regexp_pattern)
}
} else {
/* It ain't a regexp folks */
- if ( GIMME_V == G_ARRAY ) {
+ if ( gimme == G_ARRAY ) {
/* return the empty list */
XSRETURN_UNDEF;
} else {