In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/4fa7c2bfe0a54ceffcc7c56cdc072eaeaf54cad9?hp=fcd24582e9751804a977b6d4ef227de5a3b0343b>

- Log -----------------------------------------------------------------
commit 4fa7c2bfe0a54ceffcc7c56cdc072eaeaf54cad9
Author: Nicholas Clark <[email protected]>
Date:   Fri May 21 20:32:28 2010 +0100

    PL_in_load_module only has values 0 and 1, so can be a bool instead of int.
-----------------------------------------------------------------------

Summary of changes:
 intrpvar.h |    4 ++--
 perlio.c   |    5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/intrpvar.h b/intrpvar.h
index 4af88f6..bfa613c 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -257,7 +257,7 @@ PERLVAR(Iexit_flags,        U8)             /* was exit() 
unexpected, etc. */
 PERLVAR(Isrand_called, bool)
 /* Part of internal state, but makes the 16th 1 byte variable in a row.  */
 PERLVAR(Itainting,     bool)           /* doing taint checks */
-/* Space for a U8 */
+PERLVARI(Iin_load_module, bool, FALSE) /* to prevent recursions in 
PerlIO_find_layer */
 PERLVAR(Iinplace,      char *)
 PERLVAR(Ie_script,     SV *)
 
@@ -632,7 +632,7 @@ PERLVARI(Iunitcheckav_save, AV*, NULL)      /* save 
UNITCHECK{}s when compiling */
 
 PERLVARI(Iclocktick, long, 0)  /* this many times() ticks in a second */
 
-PERLVARI(Iin_load_module, int, 0)      /* to prevent recursions in 
PerlIO_find_layer */
+/* Space for an int */
 
 PERLVAR(Iunicode, U32) /* Unicode features: $ENV{PERL_UNICODE} or -C */
 
diff --git a/perlio.c b/perlio.c
index d015b58..57a61d9 100644
--- a/perlio.c
+++ b/perlio.c
@@ -807,17 +807,16 @@ PerlIO_find_layer(pTHX_ const char *name, STRLEN len, int 
load)
            SV * const layer = newSVpvn(name, len);
            CV * const cv    = get_cvs("PerlIO::Layer::NoWarnings", 0);
            ENTER;
-           SAVEINT(PL_in_load_module);
+           SAVEBOOL(PL_in_load_module);
            if (cv) {
                SAVEGENERICSV(PL_warnhook);
                PL_warnhook = MUTABLE_SV((SvREFCNT_inc_simple_NN(cv)));
            }
-           PL_in_load_module++;
+           PL_in_load_module = TRUE;
            /*
             * The two SVs are magically freed by load_module
             */
            Perl_load_module(aTHX_ 0, pkgsv, NULL, layer, NULL);
-           PL_in_load_module--;
            LEAVE;
            return PerlIO_find_layer(aTHX_ name, len, 0);
        }

--
Perl5 Master Repository

Reply via email to