svn commit: samba r3007 - in branches/SAMBA_4_0/source/scripting/swig: .

tpot at samba.org tpot at samba.org
Sun Oct 17 00:20:58 GMT 2004


Author: tpot
Date: 2004-10-17 00:20:57 +0000 (Sun, 17 Oct 2004)
New Revision: 3007

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/scripting/swig&rev=3007&nolog=1

Log:
uint32 values need to be stored in Python longs, as on 32-bit machines
Python ints can only hold int32 values.

Modified:
   branches/SAMBA_4_0/source/scripting/swig/samba.i


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/swig/samba.i
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/samba.i	2004-10-16 19:00:27 UTC (rev 3006)
+++ branches/SAMBA_4_0/source/scripting/swig/samba.i	2004-10-17 00:20:57 UTC (rev 3007)
@@ -29,9 +29,13 @@
 		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 {
         $result = PyInt_FromLong(NT_STATUS_V($1));
 }



More information about the samba-cvs mailing list