Rename the old threading tutorial, start a new one,
[p5sagit/p5-mst-13.2.git] / perl.c
diff --git a/perl.c b/perl.c
index 8cc88f2..e19ea45 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -287,7 +287,7 @@ Shuts down a Perl interpreter.  See L<perlembed>.
 int
 perl_destruct(pTHXx)
 {
-    int destruct_level;  /* 0=none, 1=full, 2=full with checks */
+    volatile int destruct_level;  /* 0=none, 1=full, 2=full with checks */
     HV *hv;
 #ifdef USE_5005THREADS
     Thread t;
@@ -2144,8 +2144,9 @@ Perl_moreswitches(pTHX_ char *s)
     switch (*s) {
     case '0':
     {
-       numlen = 0;                     /* disallow underscores */
-       rschar = (U32)scan_oct(s, 4, &numlen);
+        I32 flags = 0;
+       numlen = 4;
+       rschar = (U32)grok_oct(s, &numlen, &flags, NULL);
        SvREFCNT_dec(PL_nrs);
        if (rschar & ~((U8)~0))
            PL_nrs = &PL_sv_undef;
@@ -2276,9 +2277,10 @@ Perl_moreswitches(pTHX_ char *s)
            PL_ors_sv = Nullsv;
        }
        if (isDIGIT(*s)) {
+            I32 flags = 0;
            PL_ors_sv = newSVpvn("\n",1);
-           numlen = 0;                 /* disallow underscores */
-           *SvPVX(PL_ors_sv) = (char)scan_oct(s, 3 + (*s == '0'), &numlen);
+           numlen = 3 + (*s == '0');
+           *SvPVX(PL_ors_sv) = (char)grok_oct(s, &numlen, &flags, NULL);
            s += numlen;
        }
        else {