summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-09-29 13:26:21 +0100
committerNicholas Clark <nick@ccl4.org>2010-09-29 17:20:36 +0100
commit9be14afeeaf32ed8bfffc3fe55a17d99d7c9bd29 (patch)
tree7490b4248bfff9af36fa226c9f00122fc0a31a67
parentc527bc8419de843f52f3aee2bf5a8402bb982746 (diff)
downloadperl-9be14afeeaf32ed8bfffc3fe55a17d99d7c9bd29.tar.gz
In embed.pl, tweak the deduplication logic for global.sym
It is now independent on the ordering of embed.fnc. Previously if there were alternative implementations of a function, the version that was exported had to come first, else that symbol was skipped.
-rwxr-xr-xembed.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/embed.pl b/embed.pl
index 306dc7fb60..04f6629dbd 100755
--- a/embed.pl
+++ b/embed.pl
@@ -325,11 +325,11 @@ sub walk_table (&@) {
sub write_global_sym {
if (@_ > 1) {
my ($flags,$retval,$func,@args) = @_;
- # If a function is defined twice, for example before and after an
- # #else, only process the flags on the first instance for global.sym
- return '' if $seen{$func}++;
if ($flags =~ /[AX]/ && $flags !~ /[xm]/
|| $flags =~ /b/) { # public API, so export
+ # If a function is defined twice, for example before and after
+ # an #else, only export its name once.
+ return '' if $seen{$func}++;
$func = "Perl_$func" if $flags =~ /[pbX]/;
return "$func\n";
}