summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-10-27 04:01:17 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-10-27 04:01:17 (GMT)
commit8866e0ab58a549704818fb3bdc38a91e03d2180d (patch)
treeb00185db87dc92f47ec9b75c97fea2b116424924 /Modules
parentbed678449f55a47fad914fa9e04df547c240f810 (diff)
downloadcpython-8866e0ab58a549704818fb3bdc38a91e03d2180d.zip
cpython-8866e0ab58a549704818fb3bdc38a91e03d2180d.tar.gz
cpython-8866e0ab58a549704818fb3bdc38a91e03d2180d.tar.bz2
Try to get this test to pass on Win64 by making clean for ssize_t
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index b76c713..cb33e85 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -5,6 +5,8 @@
* standard Python regression test, via Lib/test/test_capi.py.
*/
+#define PY_SSIZE_T_CLEAN
+
#include "Python.h"
#include <float.h>
#include "structmember.h"
@@ -377,8 +379,8 @@ getargs_n(PyObject *self, PyObject *args)
{
Py_ssize_t value;
if (!PyArg_ParseTuple(args, "n", &value))
- return NULL;
- return PyInt_FromSsize_t(value);
+ return NULL;
+ return PyLong_FromSsize_t(value);
}
#ifdef HAVE_LONG_LONG
@@ -465,7 +467,7 @@ test_u_code(PyObject *self)
{
PyObject *tuple, *obj;
Py_UNICODE *value;
- int len;
+ Py_ssize_t len;
tuple = PyTuple_New(1);
if (tuple == NULL)
@@ -503,7 +505,7 @@ test_Z_code(PyObject *self)
{
PyObject *tuple, *obj;
Py_UNICODE *value1, *value2;
- int len1, len2;
+ Py_ssize_t len1, len2;
tuple = PyTuple_New(2);
if (tuple == NULL)