diff options
author | Thomas Heller <theller@ctypes.org> | 2006-03-22 13:21:16 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2006-03-22 13:21:16 (GMT) |
commit | bcfcccaf6e581bde3a32271b760a44517b1d2f2d (patch) | |
tree | 5010236ae862edc1a9aba0d69782cef90189d662 | |
parent | 59feb6f5cc2d32360f8bdebdd2e0d5df88a389d9 (diff) | |
download | cpython-bcfcccaf6e581bde3a32271b760a44517b1d2f2d.zip cpython-bcfcccaf6e581bde3a32271b760a44517b1d2f2d.tar.gz cpython-bcfcccaf6e581bde3a32271b760a44517b1d2f2d.tar.bz2 |
Fix some int/Py_ssize_t issues which led to compiler warnings
on 64-bit platforms.
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index bf963b0..bd8bf3c 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -3499,7 +3499,7 @@ Array_init(CDataObject *self, PyObject *args, PyObject *kw) } static PyObject * -Array_item(PyObject *_self, int index) +Array_item(PyObject *_self, Py_ssize_t index) { CDataObject *self = (CDataObject *)_self; int offset, size; @@ -3567,7 +3567,7 @@ Array_slice(PyObject *_self, Py_ssize_t ilow, Py_ssize_t ihigh) } static int -Array_ass_item(PyObject *_self, int index, PyObject *value) +Array_ass_item(PyObject *_self, Py_ssize_t index, PyObject *value) { CDataObject *self = (CDataObject *)_self; int size, offset; @@ -3595,7 +3595,7 @@ Array_ass_item(PyObject *_self, int index, PyObject *value) } static int -Array_ass_slice(PyObject *_self, int ilow, int ihigh, PyObject *value) +Array_ass_slice(PyObject *_self, Py_ssize_t ilow, Py_ssize_t ihigh, PyObject *value) { CDataObject *self = (CDataObject *)_self; int i, len; @@ -3636,7 +3636,7 @@ Array_ass_slice(PyObject *_self, int ilow, int ihigh, PyObject *value) return 0; } -static int +static Py_ssize_t Array_length(PyObject *_self) { CDataObject *self = (CDataObject *)_self; @@ -4002,7 +4002,7 @@ static PyTypeObject Simple_Type = { Pointer_Type */ static PyObject * -Pointer_item(PyObject *_self, int index) +Pointer_item(PyObject *_self, Py_ssize_t index) { CDataObject *self = (CDataObject *)_self; int size, offset; @@ -4030,7 +4030,7 @@ Pointer_item(PyObject *_self, int index) } static int -Pointer_ass_item(PyObject *_self, int index, PyObject *value) +Pointer_ass_item(PyObject *_self, Py_ssize_t index, PyObject *value) { CDataObject *self = (CDataObject *)_self; int size; |