Don't cast PL_multiline to bool : you may loose important bits.
Rafael Garcia-Suarez [Fri, 29 Aug 2003 20:22:21 +0000 (20:22 +0000)]
p4raw-id: //depot/perl@20938

pp.c
pp_hot.c

diff --git a/pp.c b/pp.c
index 5cb176f..c431ffa 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -4434,7 +4434,7 @@ PP(pp_split)
                s++;
        }
     }
-    if ((bool)(pm->op_pmflags & PMf_MULTILINE) != (bool)PL_multiline) {
+    if ((int)(pm->op_pmflags & PMf_MULTILINE) != PL_multiline) {
        SAVEINT(PL_multiline);
        PL_multiline = pm->op_pmflags & PMf_MULTILINE;
     }
index c70b227..0851ab8 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1234,7 +1234,7 @@ PP(pp_match)
     if (SvSCREAM(TARG))
        r_flags |= REXEC_SCREAM;
 
-    if ((bool)(pm->op_pmflags & PMf_MULTILINE) != (bool)PL_multiline) {
+    if ((int)(pm->op_pmflags & PMf_MULTILINE) != PL_multiline) {
        SAVEINT(PL_multiline);
        PL_multiline = pm->op_pmflags & PMf_MULTILINE;
     }
@@ -1979,7 +1979,7 @@ PP(pp_subst)
               ? REXEC_COPY_STR : 0;
     if (SvSCREAM(TARG))
        r_flags |= REXEC_SCREAM;
-    if ((bool)(pm->op_pmflags & PMf_MULTILINE) != (bool)PL_multiline) {
+    if ((int)(pm->op_pmflags & PMf_MULTILINE) != PL_multiline) {
        SAVEINT(PL_multiline);
        PL_multiline = pm->op_pmflags & PMf_MULTILINE;
     }