From 71aaba4ea7e0e95c7a976e2a163e0ff25689dcd4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 17 Oct 2004 00:20:57 +0000 Subject: 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) --- source4/scripting/swig/samba.i | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/scripting') 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 { -- cgit