summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-17 00:20:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:56 -0500
commit71aaba4ea7e0e95c7a976e2a163e0ff25689dcd4 (patch)
tree43c396b23d19b95d23af52f12de5833774934230 /source4/scripting
parentc209120056ceeff94f928301cbfcbade3c507994 (diff)
downloadsamba-71aaba4ea7e0e95c7a976e2a163e0ff25689dcd4.tar.gz
samba-71aaba4ea7e0e95c7a976e2a163e0ff25689dcd4.tar.bz2
samba-71aaba4ea7e0e95c7a976e2a163e0ff25689dcd4.zip
r3007: uint32 values need to be stored in Python longs, as on 32-bit machines
Python ints can only hold int32 values. (This used to be commit 7c5ada63bf5d876a1b67df2cf7bd44942e4b0a98)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/swig/samba.i6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/swig/samba.i b/source4/scripting/swig/samba.i
index 6a34f9b148..065cc7269f 100644
--- a/source4/scripting/swig/samba.i
+++ b/source4/scripting/swig/samba.i
@@ -29,7 +29,11 @@
PyErr_SetString(PyExc_TypeError, "integer expected");
return NULL;
}
- $1 = (uint32_t)PyInt_AsLong($input);
+ $1 = (uint32_t)PyLong_AsLong($input);
+}
+
+%typemap(out) uint32 {
+ $1 = PyLong_FromLong($input);
}
%typemap(out) NTSTATUS {