From: Rafael Garcia-Suarez Date: Mon, 5 Jan 2009 13:36:12 +0000 (+0100) Subject: Emit less PERL_ARGS_ASSERT_* macros X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa4ca5579932f601054c79a0ecb111132011775d;p=p5sagit%2Fp5-mst-13.2.git Emit less PERL_ARGS_ASSERT_* macros --- diff --git a/embed.pl b/embed.pl index 7eb4ad0..f85c5a3 100755 --- a/embed.pl +++ b/embed.pl @@ -161,6 +161,7 @@ sub write_protos { my $has_context = ( $flags !~ /n/ ); my $never_returns = ( $flags =~ /r/ ); my $commented_out = ( $flags =~ /m/ ); + my $binarycompat = ( $flags =~ /b/ ); my $is_malloc = ( $flags =~ /a/ ); my $can_ignore = ( $flags !~ /R/ ) && !$is_malloc; my @names_of_nn; @@ -216,7 +217,7 @@ sub write_protos { if ( $SPLINT && $nullok && !$commented_out ) { $arg = '/*@null@*/ ' . $arg; } - if (defined $1 && $nn) { + if (defined $1 && $nn && !($commented_out && !$binarycompat)) { push @names_of_nn, $1; } } diff --git a/proto.h b/proto.h index d23ae7d..a0dfbbf 100644 --- a/proto.h +++ b/proto.h @@ -2825,8 +2825,6 @@ PERL_CALLCONV void Perl_save_hints(pTHX); __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); */ -#define PERL_ARGS_ASSERT_SAVE_HELEM \ - assert(hv); assert(key); assert(sptr) PERL_CALLCONV void Perl_save_helem_flags(pTHX_ HV *hv, SV *key, SV **sptr, const U32 flags) __attribute__nonnull__(pTHX_1) @@ -3976,8 +3974,6 @@ PERL_CALLCONV void Perl_reginitcolors(pTHX); /* PERL_CALLCONV STRLEN sv_utf8_upgrade_nomg(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); */ -#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_NOMG \ - assert(sv) PERL_CALLCONV bool Perl_sv_utf8_downgrade(pTHX_ SV *const sv, const bool fail_ok) __attribute__nonnull__(pTHX_1); @@ -5958,8 +5954,6 @@ PERL_CALLCONV void Perl_sv_catsv_flags(pTHX_ SV *const dsv, SV *const ssv, const /* PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags(pTHX_ SV *const sv, const I32 flags) __attribute__nonnull__(pTHX_1); */ -#define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_FLAGS \ - assert(sv) PERL_CALLCONV STRLEN Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I32 flags, STRLEN extra) __attribute__nonnull__(pTHX_1);