summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embedvar.h2
-rw-r--r--intrpvar.h2
-rw-r--r--parser.h1
-rw-r--r--perlapi.h2
-rw-r--r--sv.c4
-rw-r--r--toke.c1
-rw-r--r--utf8.c8
7 files changed, 4 insertions, 16 deletions
diff --git a/embedvar.h b/embedvar.h
index 3ba2bfd3e8..1272bfcf2b 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -322,7 +322,6 @@
#define PL_tmps_ix (vTHX->Itmps_ix)
#define PL_tmps_max (vTHX->Itmps_max)
#define PL_tmps_stack (vTHX->Itmps_stack)
-#define PL_tokenbuf (vTHX->Itokenbuf)
#define PL_top_env (vTHX->Itop_env)
#define PL_toptarget (vTHX->Itoptarget)
#define PL_uid (vTHX->Iuid)
@@ -644,7 +643,6 @@
#define PL_Itmps_ix PL_tmps_ix
#define PL_Itmps_max PL_tmps_max
#define PL_Itmps_stack PL_tmps_stack
-#define PL_Itokenbuf PL_tokenbuf
#define PL_Itop_env PL_top_env
#define PL_Itoptarget PL_toptarget
#define PL_Iuid PL_uid
diff --git a/intrpvar.h b/intrpvar.h
index 3a171a6acf..77e455fcfd 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -431,8 +431,6 @@ PERLVARI(Imaxo, int, MAXO) /* maximum number of ops */
PERLVARI(Irunops, runops_proc_t, MEMBER_TO_FPTR(RUNOPS_DEFAULT))
-PERLVARA(Itokenbuf,256, char)
-
/*
=for apidoc Amn|SV|PL_sv_undef
This is the C<undef> SV. Always refer to this as C<&PL_sv_undef>.
diff --git a/parser.h b/parser.h
index f481cace7c..271d35a20b 100644
--- a/parser.h
+++ b/parser.h
@@ -100,6 +100,7 @@ typedef struct yy_parser {
#endif
COP *saved_curcop; /* the previous PL_curcop */
+ char tokenbuf[256];
} yy_parser;
diff --git a/perlapi.h b/perlapi.h
index 7007543519..a45571c349 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -680,8 +680,6 @@ END_EXTERN_C
#define PL_tmps_max (*Perl_Itmps_max_ptr(aTHX))
#undef PL_tmps_stack
#define PL_tmps_stack (*Perl_Itmps_stack_ptr(aTHX))
-#undef PL_tokenbuf
-#define PL_tokenbuf (*Perl_Itokenbuf_ptr(aTHX))
#undef PL_top_env
#define PL_top_env (*Perl_Itop_env_ptr(aTHX))
#undef PL_toptarget
diff --git a/sv.c b/sv.c
index 2be876854b..c614632bf2 100644
--- a/sv.c
+++ b/sv.c
@@ -9609,6 +9609,8 @@ Perl_parser_dup(pTHX_ const yy_parser *proto, CLONE_PARAMS* param)
parser->bufend = ls + SvCUR(parser->linestr);
}
+ Copy(proto->tokenbuf, parser->tokenbuf, 256, char);
+
#ifdef PERL_MAD
parser->endwhite = proto->endwhite;
@@ -11257,8 +11259,6 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_runops = proto_perl->Irunops;
- Copy(proto_perl->Itokenbuf, PL_tokenbuf, 256, char);
-
#ifdef CSH
PL_cshlen = proto_perl->Icshlen;
PL_cshname = proto_perl->Icshname; /* XXX never deallocated */
diff --git a/toke.c b/toke.c
index e00a464cc1..ef1c6a50ce 100644
--- a/toke.c
+++ b/toke.c
@@ -65,6 +65,7 @@
#define PL_rsfp_filters (PL_parser->rsfp_filters)
#define PL_in_my (PL_parser->in_my)
#define PL_in_my_stash (PL_parser->in_my_stash)
+#define PL_tokenbuf (PL_parser->tokenbuf)
#ifdef PERL_MAD
# define PL_endwhite (PL_parser->endwhite)
diff --git a/utf8.c b/utf8.c
index e6cbd48208..f5e8649b1c 100644
--- a/utf8.c
+++ b/utf8.c
@@ -1556,7 +1556,6 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits
{
dVAR;
SV* retval;
- SV* const tokenbufsv = sv_newmortal();
dSP;
const size_t pkg_len = strlen(pkg);
const size_t name_len = strlen(name);
@@ -1594,9 +1593,6 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits
PUSHs(sv_2mortal(newSViv(minbits)));
PUSHs(sv_2mortal(newSViv(none)));
PUTBACK;
- if (IN_PERL_COMPILETIME) {
- sv_setpv(tokenbufsv, PL_tokenbuf);
- }
errsv_save = newSVsv(ERRSV);
if (call_method("SWASHNEW", G_SCALAR))
retval = newSVsv(*PL_stack_sp--);
@@ -1608,10 +1604,6 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits
LEAVE;
POPSTACK;
if (IN_PERL_COMPILETIME) {
- STRLEN len;
- const char* const pv = SvPV_const(tokenbufsv, len);
-
- Copy(pv, PL_tokenbuf, len+1, char);
CopHINTS_set(PL_curcop, PL_hints);
}
if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {