svn commit: samba r5094 - in
branches/SAMBA_4_0/source/scripting/swig: .
tpot at samba.org
tpot at samba.org
Sat Jan 29 05:04:24 GMT 2005
Author: tpot
Date: 2005-01-29 05:04:23 +0000 (Sat, 29 Jan 2005)
New Revision: 5094
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5094
Log:
Use builtin swig types for converting between fixed width integer types.
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 2005-01-29 04:11:04 UTC (rev 5093)
+++ branches/SAMBA_4_0/source/scripting/swig/samba.i 2005-01-29 05:04:23 UTC (rev 5094)
@@ -24,18 +24,15 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-%typemap(in) uint32 {
- if (!PyInt_Check($input) && !PyLong_Check($input)) {
- PyErr_SetString(PyExc_TypeError, "integer expected");
- return NULL;
- }
- $1 = (uint32_t)PyLong_AsLong($input);
-}
+%apply unsigned char { uint8_t };
+%apply char { int8_t };
+%apply unsigned int { uint16_t };
+%apply int { int16_t };
+%apply unsigned long { uint32_t };
+%apply long { int32_t };
+%apply unsigned long long { uint64_t };
+%apply long long { int64_t };
-%typemap(out) uint32 {
- $result = PyLong_FromLong($1);
-}
-
%typemap(out) NTSTATUS {
$result = PyLong_FromLong(NT_STATUS_V($1));
}
More information about the samba-cvs
mailing list