summaryrefslogtreecommitdiff
path: root/embed.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-27 11:00:43 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-27 17:29:06 +0100
commit77d8c8d52bcb3950617cc1491f1f2713db7ea126 (patch)
tree036a7a37ffdcf304c1c6ef9b64497feedf95bea8 /embed.pl
parente80576f865224b380520be1bf5299811acc93967 (diff)
downloadperl-77d8c8d52bcb3950617cc1491f1f2713db7ea126.tar.gz
Move the generation of {START,END}_EXTERN_C from embed.fnc to embed.pl
Diffstat (limited to 'embed.pl')
-rwxr-xr-xembed.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/embed.pl b/embed.pl
index f0c278b750..2f2fde6593 100755
--- a/embed.pl
+++ b/embed.pl
@@ -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");