summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-05 17:18:18 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-11-05 17:18:18 +0000
commit554b3ecafd2a8f619792c82298bc621b9e48a923 (patch)
treec3138e05a93a7e87ca8c5599d1f70fc3d0493a73 /toke.c
parentea61227d0482867af3a13c7e6042a17aac4b4d4f (diff)
downloadperl-554b3ecafd2a8f619792c82298bc621b9e48a923.tar.gz
Per-thread magicals mostly working (and localisable). Now getting
intermittent occasional "Use of uninitialized value" warnings which may be due to some op flag black magic I've broken. p4raw-id: //depot/perl@204
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index 3786719096..559c6e3d0d 100644
--- a/toke.c
+++ b/toke.c
@@ -1260,7 +1260,9 @@ yylex()
#ifdef USE_THREADS
/* Check for single character per-thread magicals */
if (tokenbuf[0] == '$' && tokenbuf[2] == '\0'
- && (tmp = find_thread_magical(&tokenbuf[1])) != NOT_IN_PAD) {
+ && !isALPHA(tokenbuf[1]) /* Rule out obvious non-magicals */
+ && (tmp = find_thread_magical(&tokenbuf[1])) != NOT_IN_PAD)
+ {
yylval.opval = newOP(OP_SPECIFIC, 0);
yylval.opval->op_targ = tmp;
return PRIVATEREF;
@@ -1401,7 +1403,13 @@ yylex()
if (lex_dojoin) {
nextval[nexttoke].ival = 0;
force_next(',');
+#ifdef USE_THREADS
+ nextval[nexttoke].opval = newOP(OP_SPECIFIC, 0);
+ nextval[nexttoke].opval->op_targ = find_thread_magical("\"");
+ force_next(PRIVATEREF);
+#else
force_ident("\"", '$');
+#endif /* USE_THREADS */
nextval[nexttoke].ival = 0;
force_next('$');
nextval[nexttoke].ival = 0;
@@ -5338,7 +5346,7 @@ U32 flags;
av_store(comppadlist, 1, (SV*)comppad);
CvPADLIST(compcv) = comppadlist;
- CvOUTSIDE(compcv) = (CV*)SvREFCNT_inc((SV*)outsidecv);
+ CvOUTSIDE(compcv) = outsidecv ? (CV*)SvREFCNT_inc(outsidecv) : 0;
#ifdef USE_THREADS
CvOWNER(compcv) = 0;
New(666, CvMUTEXP(compcv), 1, perl_mutex);