Author: jelmer Date: 2007-11-19 18:20:36 +0000 (Mon, 19 Nov 2007) New Revision: 26035
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26035 Log: Use standard functions for stdint types. Modified: branches/4.0-python/ branches/4.0-python/source/scripting/swig/config.mk branches/4.0-python/source/scripting/swig/samba.i Changeset: Property changes on: branches/4.0-python ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/4.0-python/source/scripting/swig/config.mk =================================================================== --- branches/4.0-python/source/scripting/swig/config.mk 2007-11-19 18:20:33 UTC (rev 26034) +++ branches/4.0-python/source/scripting/swig/config.mk 2007-11-19 18:20:36 UTC (rev 26035) @@ -19,7 +19,7 @@ SWIG_INCLUDES = librpc/gen_ndr/samr.i librpc/gen_ndr/lsa.i librpc/gen_ndr/spoolss.i -scripting/swig/dcerpc_wrap.c: scripting/swig/dcerpc.i scripting/swig/samba.i scripting/swig/status_codes.i $(SWIG_INCLUDES) +scripting/swig/dcerpc_wrap.c: scripting/swig/dcerpc.i scripting/swig/samba.i $(SWIG_INCLUDES) clean:: @echo "Removing SWIG output files" Modified: branches/4.0-python/source/scripting/swig/samba.i =================================================================== --- branches/4.0-python/source/scripting/swig/samba.i 2007-11-19 18:20:33 UTC (rev 26034) +++ branches/4.0-python/source/scripting/swig/samba.i 2007-11-19 18:20:36 UTC (rev 26035) @@ -23,28 +23,6 @@ License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -%apply int { uint8_t }; -%apply int { int8_t }; -%apply unsigned int { uint16_t }; -%apply int { int16_t }; -%apply unsigned long long { uint64_t }; -%apply long long { int64_t }; - -%typemap(in) uint32_t { - if (PyLong_Check($input)) - $1 = PyLong_AsUnsignedLong($input); - else if (PyInt_Check($input)) - $1 = PyInt_AsLong($input); - else { - PyErr_SetString(PyExc_TypeError,"Expected a long or an int"); - return NULL; - } -} - -%typemap(out) uint32_t { - $result = PyLong_FromUnsignedLong($1); -} - %typemap(in) NTSTATUS { if (PyLong_Check($input)) $1 = NT_STATUS(PyLong_AsUnsignedLong($input)); @@ -56,10 +34,6 @@ } } -%typemap(out) NTSTATUS { - $result = PyLong_FromUnsignedLong(NT_STATUS_V($1)); -} - %typemap(in) struct cli_credentials * { $1 = cli_credentials_init(arg1); if ($input == Py_None) {
