In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/769b28f489b6336875b378e2e47e731628f45af0?hp=f0d3f5ace1d11ecf4dd9aea61c56e4f69e5c76e4>

- Log -----------------------------------------------------------------
commit 769b28f489b6336875b378e2e47e731628f45af0
Author: Aaron Crane <a...@cpan.org>
Date:   Tue Jan 24 18:25:37 2017 +0000

    Perl_sv_dump(): allow a null-pointer argument
    
    Since the recursive case already handles null pointers, and this function is
    specifically aimed at debugging, it seems sensible to handle a null pointer
    at the top level too.
-----------------------------------------------------------------------

Summary of changes:
 dump.c    | 4 +---
 embed.fnc | 2 +-
 proto.h   | 2 --
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/dump.c b/dump.c
index fedea3cd1b..9edc8bf7db 100644
--- a/dump.c
+++ b/dump.c
@@ -2397,9 +2397,7 @@ For an example of its output, see L<Devel::Peek>.
 void
 Perl_sv_dump(pTHX_ SV *sv)
 {
-    PERL_ARGS_ASSERT_SV_DUMP;
-
-    if (SvROK(sv))
+    if (sv && SvROK(sv))
        do_sv_dump(0, Perl_debug_log, sv, 0, 4, 0, 0);
     else
        do_sv_dump(0, Perl_debug_log, sv, 0, 0, 0, 0);
diff --git a/embed.fnc b/embed.fnc
index 0ee3fc8144..475d86a924 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1527,7 +1527,7 @@ Apd       |char*  |sv_collxfrm_flags      |NN SV *const 
sv|NN STRLEN *const nxp|I32 const fl
 Apd    |int    |getcwd_sv      |NN SV* sv
 Apd    |void   |sv_dec         |NULLOK SV *const sv
 Apd    |void   |sv_dec_nomg    |NULLOK SV *const sv
-Ap     |void   |sv_dump        |NN SV* sv
+Ap     |void   |sv_dump        |NULLOK SV* sv
 ApdR   |bool   |sv_derived_from|NN SV* sv|NN const char *const name
 ApdR   |bool   |sv_derived_from_sv|NN SV* sv|NN SV *namesv|U32 flags
 ApdR   |bool   |sv_derived_from_pv|NN SV* sv|NN const char *const name|U32 
flags
diff --git a/proto.h b/proto.h
index e3c04dc94c..516888cb94 100644
--- a/proto.h
+++ b/proto.h
@@ -3075,8 +3075,6 @@ PERL_CALLCONV bool        Perl_sv_does_sv(pTHX_ SV* sv, 
SV* namesv, U32 flags)
        assert(sv); assert(namesv)
 
 PERL_CALLCONV void     Perl_sv_dump(pTHX_ SV* sv);
-#define PERL_ARGS_ASSERT_SV_DUMP       \
-       assert(sv)
 /* PERL_CALLCONV I32   sv_eq(pTHX_ SV* sv1, SV* sv2); */
 PERL_CALLCONV I32      Perl_sv_eq_flags(pTHX_ SV* sv1, SV* sv2, const U32 
flags);
 #ifndef NO_MATHOMS

--
Perl5 Master Repository

Reply via email to