From: Nicholas Clark Date: Sun, 29 Mar 2009 11:30:25 +0000 (+0100) Subject: In Perl_newCONSTSUB(), sv should not be NULL. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9340c80aaec7d3857f387eea86207c1a9604b2ad;p=p5sagit%2Fp5-mst-13.2.git In Perl_newCONSTSUB(), sv should not be NULL. --- diff --git a/embed.fnc b/embed.fnc index 27dd26a..395bc23 100644 --- a/embed.fnc +++ b/embed.fnc @@ -646,7 +646,7 @@ Apa |OP* |newANONHASH |NULLOK OP* o Ap |OP* |newANONSUB |I32 floor|NULLOK OP* proto|NULLOK OP* block Apa |OP* |newASSIGNOP |I32 flags|NULLOK OP* left|I32 optype|NULLOK OP* right Apa |OP* |newCONDOP |I32 flags|NN OP* first|NULLOK OP* trueop|NULLOK OP* falseop -Apd |CV* |newCONSTSUB |NULLOK HV* stash|NULLOK const char* name|NULLOK SV* sv +Apd |CV* |newCONSTSUB |NULLOK HV* stash|NULLOK const char* name|NN SV* sv #ifdef PERL_MAD Ap |OP* |newFORM |I32 floor|NULLOK OP* o|NULLOK OP* block #else diff --git a/proto.h b/proto.h index 552b9f6..1c132db 100644 --- a/proto.h +++ b/proto.h @@ -1992,7 +1992,11 @@ PERL_CALLCONV OP* Perl_newCONDOP(pTHX_ I32 flags, OP* first, OP* trueop, OP* fal #define PERL_ARGS_ASSERT_NEWCONDOP \ assert(first) -PERL_CALLCONV CV* Perl_newCONSTSUB(pTHX_ HV* stash, const char* name, SV* sv); +PERL_CALLCONV CV* Perl_newCONSTSUB(pTHX_ HV* stash, const char* name, SV* sv) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT_NEWCONSTSUB \ + assert(sv) + #ifdef PERL_MAD PERL_CALLCONV OP* Perl_newFORM(pTHX_ I32 floor, OP* o, OP* block); #else