summaryrefslogtreecommitdiff
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
parente80576f865224b380520be1bf5299811acc93967 (diff)
downloadperl-77d8c8d52bcb3950617cc1491f1f2713db7ea126.tar.gz
Move the generation of {START,END}_EXTERN_C from embed.fnc to embed.pl
-rw-r--r--embed.fnc3
-rwxr-xr-xembed.pl14
-rw-r--r--proto.h2
3 files changed, 14 insertions, 5 deletions
diff --git a/embed.fnc b/embed.fnc
index 9ba33d15dd..3b515366fe 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -118,8 +118,6 @@
:
: Individual flags may be separated by whitespace.
-START_EXTERN_C
-
#if defined(PERL_IMPLICIT_SYS)
Ano |PerlInterpreter*|perl_alloc_using \
|NN struct IPerlMem *ipM \
@@ -2415,7 +2413,6 @@ Aanop |CLONE_PARAMS *|clone_params_new|NN PerlInterpreter *const from \
|NN PerlInterpreter *const to
Anop |void |clone_params_del|NN CLONE_PARAMS *param
#endif
-END_EXTERN_C
/*
* ex: set ts=8 sts=4 sw=4 noet:
*/
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");
diff --git a/proto.h b/proto.h
index a2fd1f7e36..5b207dc354 100644
--- a/proto.h
+++ b/proto.h
@@ -7018,8 +7018,8 @@ PERL_CALLCONV void Perl_clone_params_del(CLONE_PARAMS *param)
assert(param)
#endif
-END_EXTERN_C
/*
* ex: set ts=8 sts=4 sw=4 noet:
*/
+END_EXTERN_C
/* ex: set ro: */