summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-06 22:42:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-06 23:00:57 -0700
commit4bff32c56f5c1d1515069d4ce0d05531758f6561 (patch)
tree5c136bac90c00a726e052c4fc4a5b11813a24280
parentb69f5762a54ed8985a9b50b54cbf5912ffda3ea4 (diff)
downloadperl-4bff32c56f5c1d1515069d4ce0d05531758f6561.tar.gz
Remove GV_ADDINEVAL
This flag does absolutely nothing. The use of 8 as a flag to pass to gv_fetchpv was added in this commit: commit 93233ece75d8fe98a77377e72c4d6004c5ea8691 Author: Chip Salzenberg <chip@pobox.com> Date: Tue Mar 3 04:39:49 1998 +0000 [win32] merge problematic maintpatch to op.c #77: "Eliminate double warnings under C<package;>" Files: gv.c op.c toke.c But nothing in gv.c made use of it at the time. Later it was changed into a #define in commit 0f303493c6. Subse- quently more uses were added in 77ca0c92 and f558d5af04. It still does nothing. Nothing outside the perl core references it.
-rw-r--r--gv.h2
-rw-r--r--toke.c13
2 files changed, 5 insertions, 10 deletions
diff --git a/gv.h b/gv.h
index 5071591742..6e3295c87f 100644
--- a/gv.h
+++ b/gv.h
@@ -221,7 +221,7 @@ Return the CV from the GV.
#define GV_ADDMULTI 0x02 /* add, pretending it has been added
already; used also by gv_init_* */
#define GV_ADDWARN 0x04 /* add, but warn if symbol wasn't already there */
-#define GV_ADDINEVAL 0x08 /* add, as though we're doing so within an eval */
+ /* 0x08 UNUSED */
#define GV_NOINIT 0x10 /* add, but don't init symbol, if type != PVGV */
/* This is used by toke.c to avoid turing placeholder constants in the symbol
table into full PVGVs with attached constant subroutines. */
diff --git a/toke.c b/toke.c
index b98fe6f60e..028c685281 100644
--- a/toke.c
+++ b/toke.c
@@ -2054,7 +2054,7 @@ S_force_ident(pTHX_ const char *s, int kind)
warnings if the symbol must be introduced in an eval.
GSAR 96-10-12 */
gv_fetchpvn_flags(s, len,
- (PL_in_eval ? (GV_ADDMULTI | GV_ADDINEVAL)
+ (PL_in_eval ? GV_ADDMULTI
: GV_ADD) | ( UTF ? SVf_UTF8 : 0 ),
kind == '$' ? SVt_PV :
kind == '@' ? SVt_PVAV :
@@ -8162,10 +8162,7 @@ S_pending_ident(pTHX)
pl_yylval.opval->op_private = OPpCONST_ENTERED;
if (pit != '&')
gv_fetchsv(sym,
- (PL_in_eval
- ? (GV_ADDMULTI | GV_ADDINEVAL)
- : GV_ADDMULTI
- ),
+ GV_ADDMULTI,
((PL_tokenbuf[0] == '$') ? SVt_PV
: (PL_tokenbuf[0] == '@') ? SVt_PVAV
: SVt_PVHV));
@@ -8209,7 +8206,7 @@ S_pending_ident(pTHX)
pl_yylval.opval->op_private = OPpCONST_ENTERED;
if (pit != '&')
gv_fetchpvn_flags(PL_tokenbuf+1, tokenbuf_len - 1,
- (PL_in_eval ? (GV_ADDMULTI | GV_ADDINEVAL) : GV_ADD)
+ (PL_in_eval ? GV_ADDMULTI : GV_ADD)
| ( UTF ? SVf_UTF8 : 0 ),
((PL_tokenbuf[0] == '$') ? SVt_PV
: (PL_tokenbuf[0] == '@') ? SVt_PVAV
@@ -9384,9 +9381,7 @@ S_scan_inputsymbol(pTHX_ char *start)
++d;
intro_sym:
gv = gv_fetchpv(d,
- (PL_in_eval
- ? (GV_ADDMULTI | GV_ADDINEVAL)
- : GV_ADDMULTI) | ( UTF ? SVf_UTF8 : 0 ),
+ GV_ADDMULTI | ( UTF ? SVf_UTF8 : 0 ),
SVt_PV);
PL_lex_op = readline_overriden
? (OP*)newUNOP(OP_ENTERSUB, OPf_STACKED,