This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
move PL_lex_state into the PL_parser struct
[perl5.git] / mg.c
diff --git a/mg.c b/mg.c
index 328885f..655af2b 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -807,7 +807,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
        break;
     case '\023':               /* ^S */
        if (nextchar == '\0') {
-           if (PL_lex_state != LEX_NOTPARSING)
+           if (PL_parser && PL_parser->lex_state != LEX_NOTPARSING)
                SvOK_off(sv);
            else if (PL_in_eval)
                sv_setiv(sv, PL_in_eval & ~(EVAL_INREQUIRE));