diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-05 17:18:18 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-05 17:18:18 +0000 |
commit | 554b3ecafd2a8f619792c82298bc621b9e48a923 (patch) | |
tree | c3138e05a93a7e87ca8c5599d1f70fc3d0493a73 /toke.c | |
parent | ea61227d0482867af3a13c7e6042a17aac4b4d4f (diff) | |
download | perl-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.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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); |