From 85a2db200a11ebc4f325f9da8bfda29c3fa403c6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 17 Oct 2004 00:37:36 +0000 Subject: r3010: Do some more PyInt vs PyLong checks. (This used to be commit b19dc6cd9c1ac44d970b092f09cf96c737a90fdd) --- source4/scripting/swig/samba.i | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/scripting/swig/samba.i') diff --git a/source4/scripting/swig/samba.i b/source4/scripting/swig/samba.i index 065cc7269f..38a5251a08 100644 --- a/source4/scripting/swig/samba.i +++ b/source4/scripting/swig/samba.i @@ -25,7 +25,7 @@ */ %typemap(in) uint32 { - if (!PyInt_Check($input)) { + if (!PyInt_Check($input) && !PyLong_Check($input)) { PyErr_SetString(PyExc_TypeError, "integer expected"); return NULL; } @@ -37,6 +37,5 @@ } %typemap(out) NTSTATUS { - $result = PyInt_FromLong(NT_STATUS_V($1)); + $result = PyLong_FromLong(NT_STATUS_V($1)); } - -- cgit