In perl.git, the branch smoke-me/leont/perlio-win32 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/8eaff90c13544b96799fc27a09c05dec3d2706c9?hp=6e9f2f2d7d7f6ae8cf72ada5a8bf7781fba14273>

- Log -----------------------------------------------------------------
commit 8eaff90c13544b96799fc27a09c05dec3d2706c9
Author: Daniel Dragan <bul...@hotmail.com>
Date:   Fri Jul 11 00:10:49 2014 -0400

    fix crash in PerlIOWin32_open
    
    checking if(f) isn't enough, *f also must be checked or it will crash,
    use the correct PerlIOValid macro instead of just checking f

M       win32/win32io.c

commit ca08274a8fb5f8a6004b18fe2e62728ca60570a6
Author: Daniel Dragan <bul...@hotmail.com>
Date:   Fri Jul 11 11:01:08 2014 -0400

    fix "Revert "add a warning for using the :win32 PerlIO layer"
    
    commit 6e9f2f2d7d in caller.t lowered the number of warnings bytes from
    16 to 15, but didn't lower it anywhere else, such as in warnings.pm,
    probably due to the 2 new warnings (missing, redundant) added after win32 io
    layer warning was added, so bump the 15 to 16 to make caller.t pass

M       t/op/caller.t
-----------------------------------------------------------------------

Summary of changes:
 t/op/caller.t   | 4 ++--
 win32/win32io.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/op/caller.t b/t/op/caller.t
index 54a6bac..c43f576 100644
--- a/t/op/caller.t
+++ b/t/op/caller.t
@@ -111,8 +111,8 @@ sub testwarn {
 
     # The repetition number must be set to the value of $BYTES in
     # lib/warnings.pm
-    BEGIN { check_bits( ${^WARNING_BITS}, "\0" x 15, 'all bits off via "no 
warnings"' ) }
-    testwarn("\0" x 15, 'no bits');
+    BEGIN { check_bits( ${^WARNING_BITS}, "\0" x 16, 'all bits off via "no 
warnings"' ) }
+    testwarn("\0" x 16, 'no bits');
 
     use warnings;
     BEGIN { check_bits( ${^WARNING_BITS}, $default,
diff --git a/win32/win32io.c b/win32/win32io.c
index 5e357b5..9ac2621 100644
--- a/win32/win32io.c
+++ b/win32/win32io.c
@@ -69,7 +69,7 @@ PerlIOWin32_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t 
*layers, IV n, const ch
 {
  const char *tmode = mode;
  HANDLE h = INVALID_HANDLE_VALUE;
- if (f)
+ if (PerlIOValid(f))
   {
    /* Close if already open */
    if (PerlIOBase(f)->flags & PERLIO_F_OPEN)

--
Perl5 Master Repository

Reply via email to