summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-12-20 19:55:46 +0000
committerNicholas Clark <nick@ccl4.org>2005-12-20 19:55:46 +0000
commitadd2581e58e8d35079b402632186684a5cef9cd2 (patch)
tree589047536ba114f1b37f5a3e2dab60b2dea75d6b /gv.c
parent0bcc798661c94fefec5a89ff3321c5a519313444 (diff)
downloadperl-add2581e58e8d35079b402632186684a5cef9cd2.tar.gz
Add a GV_NOADD_NOINIT flag to gv_fetch{pv,pvn,sv} that disables
addition of new typeglobs, and also disables initialisation of any typeglob placeholders. Needed to make the new constant subroutine proxy references work efficiently. p4raw-id: //depot/perl@26425
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index 97c344809a..9e4dcad977 100644
--- a/gv.c
+++ b/gv.c
@@ -722,7 +722,8 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
I32 len;
register const char *namend;
HV *stash = 0;
- const I32 add = flags & ~SVf_UTF8;
+ const I32 no_init = flags & (GV_NOADD_NOINIT | GV_NOINIT);
+ const I32 add = flags & ~SVf_UTF8 & ~ GV_NOADD_NOINIT;
PERL_UNUSED_ARG(full_len);
@@ -887,7 +888,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
require_errno(gv);
}
return gv;
- } else if (add & GV_NOINIT) {
+ } else if (no_init) {
return gv;
}