From: Thomas Heller Date: Tue, 25 Mar 2008 21:18:39 +0000 (+0000) Subject: Make _ctypes.c PY_SSIZE_T_CLEAN. X-Git-Tag: v2.6a2~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fffd93905663e73129403f4242f6810a93c96f63;p=python Make _ctypes.c PY_SSIZE_T_CLEAN. --- diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index eab462d64f..77c15f3a02 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -104,6 +104,8 @@ bytes(cdata) * */ +#define PY_SSIZE_T_CLEAN + #include "Python.h" #include "structmember.h" @@ -2293,7 +2295,7 @@ static PyObject * CData_setstate(PyObject *_self, PyObject *args) { void *data; - int len; + Py_ssize_t len; int res; PyObject *dict, *mydict; CDataObject *self = (CDataObject *)_self; @@ -3023,7 +3025,7 @@ CFuncPtr_FromVtblIndex(PyTypeObject *type, PyObject *args, PyObject *kwds) char *name = NULL; PyObject *paramflags = NULL; GUID *iid = NULL; - int iid_len = 0; + Py_ssize_t iid_len = 0; if (!PyArg_ParseTuple(args, "is|Oz#", &index, &name, ¶mflags, &iid, &iid_len)) return NULL;