summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2008-03-25 21:18:39 (GMT)
committerThomas Heller <theller@ctypes.org>2008-03-25 21:18:39 (GMT)
commitfffd93905663e73129403f4242f6810a93c96f63 (patch)
tree5c8b1ac3306e5132a3f561fad54359936c617353 /Modules
parent6f7e71dc3241597d497c1d9f910a8a9798059463 (diff)
downloadcpython-fffd93905663e73129403f4242f6810a93c96f63.zip
cpython-fffd93905663e73129403f4242f6810a93c96f63.tar.gz
cpython-fffd93905663e73129403f4242f6810a93c96f63.tar.bz2
Make _ctypes.c PY_SSIZE_T_CLEAN.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/_ctypes.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index eab462d..77c15f3 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, &paramflags, &iid, &iid_len))
return NULL;