summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-13 01:50:31 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-14 19:53:04 +0100
commit4ba71079272b1231c457112ac2d90f1f920cf5c8 (patch)
tree5d8ec1cf9f75d44167aed796c9eab290e8371512 /source4
parentf0916ef230b48e3140a4fca68f96ab33350bee93 (diff)
downloadsamba-4ba71079272b1231c457112ac2d90f1f920cf5c8.tar.gz
samba-4ba71079272b1231c457112ac2d90f1f920cf5c8.tar.bz2
samba-4ba71079272b1231c457112ac2d90f1f920cf5c8.zip
pidl/python: Fix conversion of last few non-standard types.
(This used to be commit b8bdbc38c15598e34c55fb9e3ee1f6894964d2c6)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Python.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 98e9ee9ec2..4ae647aa0a 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -9,7 +9,7 @@ use Exporter;
@ISA = qw(Exporter);
use strict;
-use Parse::Pidl::Typelist qw(hasType getType mapTypeName);
+use Parse::Pidl::Typelist qw(hasType getType mapTypeName expandAlias);
use Parse::Pidl::Util qw(has_property ParseExpr);
use Parse::Pidl::CUtil qw(get_value_of get_pointer_to);
@@ -471,7 +471,7 @@ sub ConvertObjectFromPython($$$)
if ($actual_ctype->{TYPE} eq "ENUM" or $actual_ctype->{TYPE} eq "BITMAP" or
$actual_ctype->{TYPE} eq "SCALAR" and (
- $actual_ctype->{NAME} =~ /^(uint[0-9]+|hyper|NTTIME|time_t|NTTIME_hyper|NTTIME_1sec|dlong|udlong)$/)) {
+ expandAlias($actual_ctype->{NAME}) =~ /^(uint[0-9]+|hyper|NTTIME|time_t|NTTIME_hyper|NTTIME_1sec|dlong|udlong)$/)) {
return "PyInt_AsLong($cvar)";
}
@@ -502,7 +502,7 @@ sub ConvertObjectToPython($$$)
if ($cvar =~ /^[0-9]+$/ or
$actual_ctype->{TYPE} eq "ENUM" or $actual_ctype->{TYPE} eq "BITMAP" or
($actual_ctype->{TYPE} eq "SCALAR" and
- $actual_ctype->{NAME} =~ /^(int|long|char|u?int[0-9]+|hyper|dlong|udlong|time_t|NTTIME_hyper|NTTIME|NTTIME_1sec)$/)) {
+ expandAlias($actual_ctype->{NAME}) =~ /^(int|long|char|u?int[0-9]+|hyper|dlong|udlong|udlongr|time_t|NTTIME_hyper|NTTIME|NTTIME_1sec)$/)) {
return "PyInt_FromLong($cvar)";
}
@@ -513,7 +513,7 @@ sub ConvertObjectToPython($$$)
}
if ($actual_ctype->{TYPE} eq "SCALAR" and
- $actual_ctype->{NAME} eq "DATA_BLOB") {
+ expandAlias($actual_ctype->{NAME}) eq "DATA_BLOB") {
return "PyString_FromStringAndSize($cvar->data, $cvar->length)";
}
@@ -530,7 +530,7 @@ sub ConvertObjectToPython($$$)
}
if ($actual_ctype->{TYPE} eq "SCALAR" and
- ($actual_ctype->{NAME} eq "string" or $actual_ctype->{NAME} eq "nbt_string")) {
+ ($actual_ctype->{NAME} eq "string" or $actual_ctype->{NAME} eq "nbt_string" or $actual_ctype->{NAME} eq "nbt_name" or $actual_ctype->{NAME} eq "wrepl_nbt_name")) {
return "PyString_FromString($cvar)";
}