summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/Python.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Python.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 8ff909a455..31b06d16b8 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -612,7 +612,7 @@ sub ConvertObjectFromPythonData($$$$$$)
if ($actual_ctype->{TYPE} eq "ENUM" or $actual_ctype->{TYPE} eq "BITMAP" or
$actual_ctype->{TYPE} eq "SCALAR" and (
- expandAlias($actual_ctype->{NAME}) =~ /^(u?int[0-9]+|hyper|NTTIME|time_t|NTTIME_hyper|NTTIME_1sec|dlong|udlong|udlongr)$/)) {
+ expandAlias($actual_ctype->{NAME}) =~ /^(u?int[0-9]*|hyper|NTTIME|time_t|NTTIME_hyper|NTTIME_1sec|dlong|udlong|udlongr)$/)) {
$self->pidl("PY_CHECK_TYPE(PyInt, $cvar, $fail);");
$self->pidl("$target = PyInt_AsLong($cvar);");
return;
@@ -748,7 +748,7 @@ sub ConvertScalarToPython($$$)
$ctypename = expandAlias($ctypename);
- if ($ctypename =~ /^(int|long|char|u?int[0-9]+|hyper|dlong|udlong|udlongr|time_t|NTTIME_hyper|NTTIME|NTTIME_1sec)$/) {
+ if ($ctypename =~ /^(char|u?int[0-9]*|hyper|dlong|udlong|udlongr|time_t|NTTIME_hyper|NTTIME|NTTIME_1sec)$/) {
return "PyInt_FromLong($cvar)";
}
@@ -938,7 +938,7 @@ sub Parse($$$$$)
} elsif ($cvar =~ /^".*"$/) {
$py_obj = "PyString_FromString($cvar)";
} else {
- $py_obj = $self->ConvertObjectToPythonData("NULL", $ctype, $cvar);
+ $py_obj = $self->ConvertObjectToPythonData("NULL", expandAlias($ctype), $cvar);
}
$self->pidl("PyModule_AddObject(m, \"$name\", $py_obj);");