summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 45d33b8055..000f543fa4 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -850,13 +850,11 @@ sub ConvertObjectFromPythonData($$$$$$;$)
}
if ($actual_ctype->{TYPE} eq "SCALAR" ) {
if (expandAlias($actual_ctype->{NAME}) =~ /^(u?int64|hyper|dlong|udlong|udlongr|NTTIME_hyper|NTTIME|NTTIME_1sec)$/) {
- $self->pidl("if (PyObject_TypeCheck($cvar, &PyLong_Type)) {");
+ $self->pidl("if (PyLong_Check($cvar)) {");
$self->indent;
$self->pidl("$target = PyLong_AsLongLong($cvar);");
$self->deindent;
- $self->pidl("} else {");
- $self->indent;
- $self->pidl("if (PyObject_TypeCheck($cvar, &PyInt_Type)) {");
+ $self->pidl("} else if (PyInt_Check($cvar)) {");
$self->indent;
$self->pidl("$target = PyInt_AsLong($cvar);");
$self->deindent;