X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=embed.pl;h=a88016c493d058029264e35c21b3d6a65720c171;hb=d1ca9ea32e7b8d5812a70687974b0e642057ff99;hp=27815ae9cd75804aa01c91e2eac0c9dc73c0022d;hpb=3c0f78ca4f737d7b40beecbfdca31b9f7e3fb952;p=p5sagit%2Fp5-mst-13.2.git diff --git a/embed.pl b/embed.pl index 27815ae..a88016c 100755 --- a/embed.pl +++ b/embed.pl @@ -194,7 +194,13 @@ sub write_protos { my $n; for my $arg ( @args ) { ++$n; + if ( $arg =~ /\*/ && $arg !~ /\b(NN|NULLOK)\b/ ) { + warn "$func: $arg needs NN or NULLOK\n"; + our $unflagged_pointers; + ++$unflagged_pointers; + } push( @nonnull, $n ) if ( $arg =~ s/\s*\bNN\b\s+// ); + $arg =~ s/\s*\bNULLOK\b\s+//; # strip NULLOK with no effect } $ret .= join ", ", @args; } @@ -251,7 +257,9 @@ sub write_global_sym { $ret; } +our $unflagged_pointers; walk_table(\&write_protos, "proto.h", undef, "/* ex: set ro: */\n"); +warn "$unflagged_pointers pointer arguments to clean up\n" if $unflagged_pointers; walk_table(\&write_global_sym, "global.sym", undef, "# ex: set ro:\n"); # XXX others that may need adding @@ -953,3 +961,5 @@ my %vfuncs = qw( Perl_dump_indent Perl_dump_vindent Perl_default_protect Perl_vdefault_protect ); + +# ex: set ts=8 sts=4 sw=4 noet: