In Perl_sv_setsv_cow(), dstr can be NULL.
authorNicholas Clark <nick@ccl4.org>
Sat, 28 Mar 2009 23:00:15 +0000 (23:00 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 19 Apr 2009 22:14:20 +0000 (23:14 +0100)
(cherry picked from commit 7536ed57886a47a6a6af672eef2ce348b3b4a684)

embed.fnc
proto.h

index a8dadab..6cddb88 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1845,7 +1845,7 @@ Apn       |int    |my_socketpair  |int family|int type|int protocol|int fd[2]
 Ap     |int    |my_dirfd       |NULLOK DIR* dir
 #ifdef PERL_OLD_COPY_ON_WRITE
 : Used in pp_hot.c and regexec.c
-pMXE   |SV*    |sv_setsv_cow   |NN SV* dstr|NN SV* sstr
+pMXE   |SV*    |sv_setsv_cow   |NULLOK SV* dstr|NN SV* sstr
 #endif
 
 Aop    |const char *|PerlIO_context_layers|NULLOK const char *mode
diff --git a/proto.h b/proto.h
index 15ddf97..ccb9eb3 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -5985,10 +5985,9 @@ PERL_CALLCONV int        Perl_my_socketpair(int family, int type, int protocol, int fd[
 PERL_CALLCONV int      Perl_my_dirfd(pTHX_ DIR* dir);
 #ifdef PERL_OLD_COPY_ON_WRITE
 PERL_CALLCONV SV*      Perl_sv_setsv_cow(pTHX_ SV* dstr, SV* sstr)
-                       __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_SV_SETSV_COW  \
-       assert(dstr); assert(sstr)
+       assert(sstr)
 
 #endif