summaryrefslogtreecommitdiff
path: root/regen/opcode.pl
diff options
context:
space:
mode:
authorTomasz Konojacki <me@xenu.pl>2022-06-18 07:26:58 +0200
committerxenu <me@xenu.pl>2022-06-18 08:51:14 +0200
commit0351a629e71de127cbfd1b142e9eaa6069deabf5 (patch)
treed3248e133b1eb3d42bdfa321e9e8d06820628ad4 /regen/opcode.pl
parent2287d33092e0f6594e38c269503627308460e02e (diff)
downloadperl-0351a629e71de127cbfd1b142e9eaa6069deabf5.tar.gz
hide private functions with __attribute__((visibility("hidden")))
This allows us to enforce API boundaries and potentially enables compiler optimisations. We've been always hiding non-public symbols on Windows. This commit brings that to the other platforms.
Diffstat (limited to 'regen/opcode.pl')
-rwxr-xr-xregen/opcode.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/regen/opcode.pl b/regen/opcode.pl
index 6f631158b9..ce55d7fa65 100755
--- a/regen/opcode.pl
+++ b/regen/opcode.pl
@@ -1220,7 +1220,9 @@ my $pp = open_new('pp_proto.h', '>',
my $name = $alias{$_} ? $alias{$_}[0] : "Perl_pp_$_";
++$funcs{$name};
}
- print $pp "PERL_CALLCONV OP *$_(pTHX);\n" foreach sort keys %funcs;
+ for (sort keys %funcs) {
+ print $pp qq{PERL_CALLCONV OP *$_(pTHX) __attribute__visibility__("hidden");\n};
+ }
}
print $oc "\n\n";