summaryrefslogtreecommitdiff
path: root/source4/build/pidl/header.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/pidl/header.pm')
-rw-r--r--source4/build/pidl/header.pm26
1 files changed, 6 insertions, 20 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index 7618886bc2..589f9c6b54 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -9,8 +9,6 @@ use strict;
my($res);
my($tab_depth);
-my $if_uuid;
-my $if_version;
sub tabs()
{
@@ -187,6 +185,7 @@ sub HeaderFunctionInOut($$)
{
my($fn) = shift;
my($prop) = shift;
+
foreach my $e (@{$fn->{DATA}}) {
if (util::has_property($e, $prop)) {
HeaderElement($e);
@@ -220,6 +219,7 @@ sub HeaderFunctionInOut_needed($$)
sub HeaderFunction($)
{
my($fn) = shift;
+
$res .= "\nstruct $fn->{NAME} {\n";
$tab_depth++;
my $needed = 0;
@@ -272,12 +272,12 @@ sub HeaderInterface($)
$res .= "#ifndef _HEADER_NDR_$interface->{NAME}\n";
$res .= "#define _HEADER_NDR_$interface->{NAME}\n\n";
- if (defined $if_uuid) {
+ if (defined $interface->{PROPERTIES}->{uuid}) {
my $name = uc $interface->{NAME};
- $res .= "#define DCERPC_$name\_UUID \"$if_uuid\"\n";
+ $res .= "#define DCERPC_$name\_UUID \"$interface->{PROPERTIES}->{uuid}\"\n";
- if(!defined $if_version) { $if_version = "0.0"; }
- $res .= "#define DCERPC_$name\_VERSION $if_version\n";
+ if(!defined $interface->{PROPERTIES}->{version}) { $interface->{PROPERTIES}->{version} = "0.0"; }
+ $res .= "#define DCERPC_$name\_VERSION $interface->{PROPERTIES}->{version}\n";
$res .= "#define DCERPC_$name\_NAME \"$interface->{NAME}\"\n\n";
$res .= "extern const struct dcerpc_interface_table dcerpc_table_$interface->{NAME};\n";
$res .= "NTSTATUS dcerpc_$interface->{NAME}_init(void);\n\n";
@@ -306,17 +306,6 @@ sub HeaderInterface($)
}
#####################################################################
-# parse the interface definitions
-sub ModuleHeader($)
-{
- my($h) = shift;
-
- $if_uuid = $h->{PROPERTIES}->{uuid};
- $if_version = $h->{PROPERTIES}->{version};
-}
-
-
-#####################################################################
# parse a parsed IDL into a C header
sub Parse($)
{
@@ -325,9 +314,6 @@ sub Parse($)
$res = "/* header auto-generated by pidl */\n\n";
foreach my $x (@{$idl}) {
- ($x->{TYPE} eq "MODULEHEADER") &&
- ModuleHeader($x);
-
($x->{TYPE} eq "INTERFACE") &&
HeaderInterface($x);
}