Perl_die_nocontext() is also called with NULL from XS extensions that want to set...
authorVincent Pit <perl@profvince.com>
Thu, 13 Aug 2009 11:34:48 +0000 (13:34 +0200)
committerDavid Mitchell <davem@iabyn.com>
Sat, 15 Aug 2009 16:36:34 +0000 (17:36 +0100)
This commit goes with 52a5bfab8876f302d269f1bfa46eae1998f0d3ca.

(cherry picked from commit cf284a245bd2c9f479068768a1e22147f7925e7d)

embed.fnc
proto.h
util.c

index 6cddb88..4a14785 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -161,7 +161,7 @@ Aprd        |void   |croak_xs_usage |NN const CV *const cv \
 
 #if defined(PERL_IMPLICIT_CONTEXT)
 Afnrp  |void   |croak_nocontext|NULLOK const char* pat|...
-Afnp   |OP*    |die_nocontext  |NN const char* pat|...
+Afnp   |OP*    |die_nocontext  |NULLOK const char* pat|...
 Afnp   |void   |deb_nocontext  |NN const char* pat|...
 Afnp   |char*  |form_nocontext |NN const char* pat|...
 Anp    |void   |load_module_nocontext|U32 flags|NN SV* name|NULLOK SV* ver|...
diff --git a/proto.h b/proto.h
index ccb9eb3..ce766bc 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -329,10 +329,7 @@ PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...)
                        __attribute__format__null_ok__(__printf__,1,2);
 
 PERL_CALLCONV OP*      Perl_die_nocontext(const char* pat, ...)
-                       __attribute__format__(__printf__,1,2)
-                       __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_DIE_NOCONTEXT \
-       assert(pat)
+                       __attribute__format__null_ok__(__printf__,1,2);
 
 PERL_CALLCONV void     Perl_deb_nocontext(const char* pat, ...)
                        __attribute__format__(__printf__,1,2)
diff --git a/util.c b/util.c
index 23d5d2d..6d4db98 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1397,7 +1397,6 @@ Perl_die_nocontext(const char* pat, ...)
     dTHX;
     OP *o;
     va_list args;
-    PERL_ARGS_ASSERT_DIE_NOCONTEXT;
     va_start(args, pat);
     o = vdie(pat, &args);
     va_end(args);