croak() accepts Nullch as a parameter.
Rafael Garcia-Suarez [Wed, 20 Jul 2005 10:59:44 +0000 (10:59 +0000)]
(spotted by Stas Bekman)

p4raw-id: //depot/perl@25197

embed.fnc
proto.h

index 5b59e71..7363a46 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -127,10 +127,10 @@ ApR       |UV     |cast_uv        |NV f
 ApR    |I32    |my_chsize      |int fd|Off_t length
 #endif
 pR     |OP*    |convert        |I32 optype|I32 flags|NULLOK OP* o
-Afprd  |void   |croak          |NN const char* pat|...
-Apr    |void   |vcroak         |NN const char* pat|NULLOK va_list* args
+Afprd  |void   |croak          |const char* pat|...
+Apr    |void   |vcroak         |const char* pat|NULLOK va_list* args
 #if defined(PERL_IMPLICIT_CONTEXT)
-Afnrp  |void   |croak_nocontext|NN const char* pat|...
+Afnrp  |void   |croak_nocontext|const char* pat|...
 Afnp   |OP*    |die_nocontext  |NN const char* pat|...
 Afnp   |void   |deb_nocontext  |NN const char* pat|...
 Afnp   |char*  |form_nocontext |NN const char* pat|...
diff --git a/proto.h b/proto.h
index fd80677..888c991 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -185,18 +185,15 @@ PERL_CALLCONV OP* Perl_convert(pTHX_ I32 optype, I32 flags, OP* o)
 
 PERL_CALLCONV void     Perl_croak(pTHX_ const char* pat, ...)
                        __attribute__noreturn__
-                       __attribute__format__(__printf__,pTHX_1,pTHX_2)
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__format__(__printf__,pTHX_1,pTHX_2);
 
 PERL_CALLCONV void     Perl_vcroak(pTHX_ const char* pat, va_list* args)
-                       __attribute__noreturn__
-                       __attribute__nonnull__(pTHX_1);
+                       __attribute__noreturn__;
 
 #if defined(PERL_IMPLICIT_CONTEXT)
 PERL_CALLCONV void     Perl_croak_nocontext(const char* pat, ...)
                        __attribute__noreturn__
-                       __attribute__format__(__printf__,1,2)
-                       __attribute__nonnull__(1);
+                       __attribute__format__(__printf__,1,2);
 
 PERL_CALLCONV OP*      Perl_die_nocontext(const char* pat, ...)
                        __attribute__format__(__printf__,1,2)