summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-10 23:49:55 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-10 23:49:55 +0000
commite5ed18db65f33ef0b0151fc34b02e049b14d1ecd (patch)
tree6213ed40e35d5eb96077e681c551a560629bcf5d /source4/build/pidl
parent2bde98c0ee67b4c60c5906b3b2f297cf4922c67c (diff)
downloadsamba-e5ed18db65f33ef0b0151fc34b02e049b14d1ecd.tar.gz
samba-e5ed18db65f33ef0b0151fc34b02e049b14d1ecd.tar.bz2
samba-e5ed18db65f33ef0b0151fc34b02e049b14d1ecd.zip
more portable array of endpoints code from pidl
(This used to be commit c598590a117d4281c530cded4bf9dae16ac1ee76)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/parser.pm11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index 02fc40f33f..ee24e9d5ef 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -1311,15 +1311,18 @@ sub FunctionTable($)
$if_endpoints = $interface->{NAME};
}
- pidl "static const struct dcerpc_endpoint_list $interface->{NAME}\_endpoints = {\n";
my @e = split / /, $if_endpoints;
my $endpoint_count = $#e + 1;
- pidl "\t$endpoint_count,\n";
- pidl "\t{ ";
+
+ pidl "static const char *$interface->{NAME}\_endpoint_strings[] = {\n\t";
for (my $i=0; $i < $#e; $i++) {
pidl "\"$e[$i]\", ";
}
- pidl "\"$e[$#e]\" }\n";
+ pidl "\"$e[$#e]\"\n";
+ pidl "};\n\n";
+
+ pidl "static const struct dcerpc_endpoint_list $interface->{NAME}\_endpoints = {\n";
+ pidl "\t$endpoint_count, $interface->{NAME}\_endpoint_strings\n";
pidl "};\n\n";
pidl "\nconst struct dcerpc_interface_table dcerpc_table_$interface->{NAME} = {\n";