summaryrefslogtreecommitdiff
path: root/source4/scripting/swig/dcerpc.i
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/swig/dcerpc.i')
-rw-r--r--source4/scripting/swig/dcerpc.i6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i
index 560345525f..27afb6471c 100644
--- a/source4/scripting/swig/dcerpc.i
+++ b/source4/scripting/swig/dcerpc.i
@@ -119,9 +119,9 @@ uint32 uint32_from_python(PyObject *obj, char *name)
}
if (PyLong_Check(obj))
- return (uint32)PyLong_AsLong(obj);
- else
- return (uint32)PyInt_AsLong(obj);
+ return (uint32)PyLong_AsUnsignedLongMask(obj);
+
+ return (uint32)PyInt_AsLong(obj);
}
PyObject *uint32_to_python(uint32 obj)