diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-09-27 11:00:43 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-09-27 17:29:06 +0100 |
commit | 77d8c8d52bcb3950617cc1491f1f2713db7ea126 (patch) | |
tree | 036a7a37ffdcf304c1c6ef9b64497feedf95bea8 /embed.pl | |
parent | e80576f865224b380520be1bf5299811acc93967 (diff) | |
download | perl-77d8c8d52bcb3950617cc1491f1f2713db7ea126.tar.gz |
Move the generation of {START,END}_EXTERN_C from embed.fnc to embed.pl
Diffstat (limited to 'embed.pl')
-rwxr-xr-x | embed.pl | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -287,7 +287,19 @@ sub write_protos { } } -walk_table(\&write_protos, "proto.h", "/* ex: set ro: */\n"); +{ + my $pr = safer_open('proto.h-new'); + + print $pr do_not_edit ("proto.h"), "\nSTART_EXTERN_C\n"; + + walk_table(\&write_protos, $pr); + + print $pr "END_EXTERN_C\n/* ex: set ro: */\n"; + + safer_close($pr); + rename_if_different('proto.h-new', 'proto.h'); +} + warn "$unflagged_pointers pointer arguments to clean up\n" if $unflagged_pointers; walk_table(\&write_global_sym, "global.sym", "# ex: set ro:\n"); |