summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-07 06:39:03 +1100
committerKarolin Seeger <kseeger@samba.org>2009-11-26 11:40:06 +0100
commitc4eb97860adcf46c37ebdc75e3105560d7a2ed36 (patch)
treeff6b3634285b6c8d278b4d45e49722197be40ab8 /pidl
parent3b5eb0a60342ec75bb270441b92d555be994d909 (diff)
downloadsamba-c4eb97860adcf46c37ebdc75e3105560d7a2ed36.tar.gz
tdr: teach TDR about uint1632 enums
TDB doesn't have NDR64, but it needs to know how to map the new types from pidl (cherry picked from commit 1d0fb1e0fba3cf4d04d4602ed4e717912804e5de) (cherry picked from commit eea15d8f117e07d3e121e087d23e50d94a7c6355)
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/TDR.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/TDR.pm b/pidl/lib/Parse/Pidl/Samba4/TDR.pm
index a6b74a0ba45..c0749304ef3 100644
--- a/pidl/lib/Parse/Pidl/Samba4/TDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/TDR.pm
@@ -7,6 +7,7 @@ package Parse::Pidl::Samba4::TDR;
use Parse::Pidl qw(fatal);
use Parse::Pidl::Util qw(has_property ParseExpr is_constant);
use Parse::Pidl::Samba4 qw(is_intree choose_header);
+use Parse::Pidl::Typelist qw(mapTypeName);
use Exporter;
@ISA = qw(Exporter);
@@ -195,15 +196,16 @@ sub ParserEnum($$$$)
{
my ($self,$e,$t,$p) = @_;
my $bt = Parse::Pidl::Typelist::enum_type_fn($e);
+ my $mt = mapTypeName($bt);
$self->fn_declare($p, "NTSTATUS tdr_$t\_$e->{NAME} (struct tdr_$t *tdr".typearg($t).", enum $e->{NAME} *v)");
$self->pidl("{");
if ($t eq "pull") {
- $self->pidl("\t$bt\_t r;");
+ $self->pidl("\t$mt r;");
$self->pidl("\tTDR_CHECK(tdr_$t\_$bt(tdr, mem_ctx, \&r));");
$self->pidl("\t*v = r;");
} elsif ($t eq "push") {
- $self->pidl("\tTDR_CHECK(tdr_$t\_$bt(tdr, ($bt\_t *)v));");
+ $self->pidl("\tTDR_CHECK(tdr_$t\_$bt(tdr, ($mt *)v));");
} elsif ($t eq "print") {
$self->pidl("\t/* FIXME */");
}