Try to get this test to pass on Win64 by making clean for ssize_t

This commit is contained in:
Neal Norwitz 2007-10-27 04:01:17 +00:00
parent bed678449f
commit 8866e0ab58
1 changed files with 6 additions and 4 deletions

View File

@ -5,6 +5,8 @@
* standard Python regression test, via Lib/test/test_capi.py. * standard Python regression test, via Lib/test/test_capi.py.
*/ */
#define PY_SSIZE_T_CLEAN
#include "Python.h" #include "Python.h"
#include <float.h> #include <float.h>
#include "structmember.h" #include "structmember.h"
@ -377,8 +379,8 @@ getargs_n(PyObject *self, PyObject *args)
{ {
Py_ssize_t value; Py_ssize_t value;
if (!PyArg_ParseTuple(args, "n", &value)) if (!PyArg_ParseTuple(args, "n", &value))
return NULL; return NULL;
return PyInt_FromSsize_t(value); return PyLong_FromSsize_t(value);
} }
#ifdef HAVE_LONG_LONG #ifdef HAVE_LONG_LONG
@ -465,7 +467,7 @@ test_u_code(PyObject *self)
{ {
PyObject *tuple, *obj; PyObject *tuple, *obj;
Py_UNICODE *value; Py_UNICODE *value;
int len; Py_ssize_t len;
tuple = PyTuple_New(1); tuple = PyTuple_New(1);
if (tuple == NULL) if (tuple == NULL)
@ -503,7 +505,7 @@ test_Z_code(PyObject *self)
{ {
PyObject *tuple, *obj; PyObject *tuple, *obj;
Py_UNICODE *value1, *value2; Py_UNICODE *value1, *value2;
int len1, len2; Py_ssize_t len1, len2;
tuple = PyTuple_New(2); tuple = PyTuple_New(2);
if (tuple == NULL) if (tuple == NULL)