diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-20 19:55:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-20 19:55:46 +0000 |
commit | add2581e58e8d35079b402632186684a5cef9cd2 (patch) | |
tree | 589047536ba114f1b37f5a3e2dab60b2dea75d6b /gv.c | |
parent | 0bcc798661c94fefec5a89ff3321c5a519313444 (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |