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 | |
parent | e80576f865224b380520be1bf5299811acc93967 (diff) | |
download | perl-77d8c8d52bcb3950617cc1491f1f2713db7ea126.tar.gz |
Move the generation of {START,END}_EXTERN_C from embed.fnc to embed.pl
-rw-r--r-- | embed.fnc | 3 | ||||
-rwxr-xr-x | embed.pl | 14 | ||||
-rw-r--r-- | proto.h | 2 |
3 files changed, 14 insertions, 5 deletions
@@ -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: */ @@ -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"); @@ -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: */ |