Skip to content

Commit 3c6f43c

Browse files
committed
croak() accepts Nullch as a parameter.
(spotted by Stas Bekman) p4raw-id: //depot/perl@25197
1 parent 4541904 commit 3c6f43c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

embed.fnc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ ApR |UV |cast_uv |NV f
127127
ApR |I32 |my_chsize |int fd|Off_t length
128128
#endif
129129
pR |OP* |convert |I32 optype|I32 flags|NULLOK OP* o
130-
Afprd |void |croak |NN const char* pat|...
131-
Apr |void |vcroak |NN const char* pat|NULLOK va_list* args
130+
Afprd |void |croak |const char* pat|...
131+
Apr |void |vcroak |const char* pat|NULLOK va_list* args
132132
#if defined(PERL_IMPLICIT_CONTEXT)
133-
Afnrp |void |croak_nocontext|NN const char* pat|...
133+
Afnrp |void |croak_nocontext|const char* pat|...
134134
Afnp |OP* |die_nocontext |NN const char* pat|...
135135
Afnp |void |deb_nocontext |NN const char* pat|...
136136
Afnp |char* |form_nocontext |NN const char* pat|...

proto.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,15 @@ PERL_CALLCONV OP* Perl_convert(pTHX_ I32 optype, I32 flags, OP* o)
185185

186186
PERL_CALLCONV void Perl_croak(pTHX_ const char* pat, ...)
187187
__attribute__noreturn__
188-
__attribute__format__(__printf__,pTHX_1,pTHX_2)
189-
__attribute__nonnull__(pTHX_1);
188+
__attribute__format__(__printf__,pTHX_1,pTHX_2);
190189

191190
PERL_CALLCONV void Perl_vcroak(pTHX_ const char* pat, va_list* args)
192-
__attribute__noreturn__
193-
__attribute__nonnull__(pTHX_1);
191+
__attribute__noreturn__;
194192

195193
#if defined(PERL_IMPLICIT_CONTEXT)
196194
PERL_CALLCONV void Perl_croak_nocontext(const char* pat, ...)
197195
__attribute__noreturn__
198-
__attribute__format__(__printf__,1,2)
199-
__attribute__nonnull__(1);
196+
__attribute__format__(__printf__,1,2);
200197

201198
PERL_CALLCONV OP* Perl_die_nocontext(const char* pat, ...)
202199
__attribute__format__(__printf__,1,2)

0 commit comments

Comments
 (0)