From 15bb913b253980a8916d534fdfd35bb0f6011478 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Sun, 2 May 2010 18:46:17 -0300 Subject: [PATCH] fix ssize_t tescase (ticket #399) --- tests/run/ssize_t_T399.pyx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/run/ssize_t_T399.pyx b/tests/run/ssize_t_T399.pyx index f6eafd32..b4559477 100644 --- a/tests/run/ssize_t_T399.pyx +++ b/tests/run/ssize_t_T399.pyx @@ -46,12 +46,13 @@ Traceback (most recent call last): OverflowError: ... """ -# XXX This should generate a warning !!! cdef extern from *: - ctypedef long ssize_t + ctypedef long ssize_t # XXX This should generate a warning !!! + ssize_t PY_SSIZE_T_MAX + ssize_t PY_SSIZE_T_MIN -SSIZE_T_MAX = ((-1)>>1) -SSIZE_T_MIN = (-SSIZE_T_MAX-1) +SSIZE_T_MAX = PY_SSIZE_T_MAX +SSIZE_T_MIN = PY_SSIZE_T_MIN def test(ssize_t i): return i -- 2.26.2