mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
pidl:Python: make sure print HASH references for STRUCT types
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
8b2b721208
commit
d62eb3cc9f
@ -245,12 +245,18 @@ sub PythonStruct($$$$$$)
|
||||
$self->pidl("static PyGetSetDef ".$getsetters."[] = {");
|
||||
$self->indent;
|
||||
foreach my $e (@{$d->{ELEMENTS}}) {
|
||||
my $etype = "";
|
||||
if (ref($e->{TYPE}) eq "HASH") {
|
||||
$etype = $e->{TYPE}->{NAME};
|
||||
} else {
|
||||
$etype = $e->{TYPE};
|
||||
}
|
||||
$self->pidl("{");
|
||||
$self->indent;
|
||||
$self->pidl(".name = discard_const_p(char, \"$e->{NAME}\"),");
|
||||
$self->pidl(".get = py_$name\_get_$e->{NAME},");
|
||||
$self->pidl(".set = py_$name\_set_$e->{NAME},");
|
||||
$self->pidl(".doc = discard_const_p(char, \"PIDL-generated element of base type $e->{TYPE}\")");
|
||||
$self->pidl(".doc = discard_const_p(char, \"PIDL-generated element of base type $etype\")");
|
||||
$self->deindent;
|
||||
$self->pidl("},");
|
||||
}
|
||||
|
Reference in New Issue
Block a user