summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/header.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-23 23:54:30 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-24 01:51:06 -0600
commitbe33f4c611d37ebba59ff618033dc73601339ad1 (patch)
tree2d1fdd393172069a89dd5819d614db6a917bc984 /source4/build/smb_build/header.pm
parent1ab5bcfb93c9fc7b18d55e6c5995efddf97fea09 (diff)
downloadsamba-be33f4c611d37ebba59ff618033dc73601339ad1.tar.gz
samba-be33f4c611d37ebba59ff618033dc73601339ad1.tar.bz2
samba-be33f4c611d37ebba59ff618033dc73601339ad1.zip
r26576: Allow the static module loading code to be used for the Python modules.
Simplify the way module initialization functions are handled. (This used to be commit ba8be2dfc0de4434c798663336b81f7f95cde520)
Diffstat (limited to 'source4/build/smb_build/header.pm')
-rw-r--r--source4/build/smb_build/header.pm14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm
index 34e81a3a24..b0dced4897 100644
--- a/source4/build/smb_build/header.pm
+++ b/source4/build/smb_build/header.pm
@@ -39,16 +39,18 @@ sub _prepare_build_h($)
$name =~ s/-/_/g;
$DEFINE->{COMMENT} = "$key->{TYPE} $key->{NAME} INIT";
$DEFINE->{KEY} = "STATIC_$name\_MODULES";
- $DEFINE->{VAL} = "{ \\\n";
+ $DEFINE->{VAL} = "\\\n";
foreach (@{$key->{INIT_FUNCTIONS}}) {
$DEFINE->{VAL} .= "\t$_, \\\n";
- my $fn = $key->{INIT_FUNCTION_TYPE};
- unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; }
- $fn =~ s/\(\*\)/$_/;
- $output .= "$fn;\n";
+ unless (/{/) {
+ my $fn = $key->{INIT_FUNCTION_TYPE};
+ unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; }
+ $fn =~ s/\(\*\)/$_/;
+ $output .= "$fn;\n";
+ }
}
- $DEFINE->{VAL} .= "\tNULL \\\n }";
+ $DEFINE->{VAL} =~ s/, \\\n$//g; # Remove the last comma
push(@defines,$DEFINE);
}