constant_add_symbol needs to be static, else static builds can fail at
authorNicholas Clark <nick@ccl4.org>
Mon, 23 Jan 2006 19:06:41 +0000 (19:06 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 23 Jan 2006 19:06:41 +0000 (19:06 +0000)
link time. (*How* many meanings is "static" overloaded with?)

p4raw-id: //depot/perl@26932

lib/ExtUtils/Constant/ProxySubs.pm

index 2df31b9..d9c9ac3 100644 (file)
@@ -198,7 +198,8 @@ sub WriteConstants {
     my $symbol_table = C_stringify($package) . '::';
 
     print $c_fh $self->header(), <<"EOADD";
-void ${c_subname}_add_symbol($pthx HV *hash, const char *name, I32 namelen, SV *value) {
+static void
+${c_subname}_add_symbol($pthx HV *hash, const char *name, I32 namelen, SV *value) {
     SV **sv = hv_fetch(hash, name, namelen, TRUE);
     if (!sv) {
         Perl_croak($athx "Couldn't add key '%s' to %%$package_sprintf_safe\::",