From: Stefan Behnel Date: Tue, 13 Jul 2010 15:49:26 +0000 (+0200) Subject: fix return types of tuple C-API calls X-Git-Tag: 0.13.beta0~26 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f07feb45b35e1332871a6cbacf65d86e2b4aead4;p=cython.git fix return types of tuple C-API calls --- diff --git a/Cython/Includes/cpython/tuple.pxd b/Cython/Includes/cpython/tuple.pxd index 78ac5778..ca4b0f02 100644 --- a/Cython/Includes/cpython/tuple.pxd +++ b/Cython/Includes/cpython/tuple.pxd @@ -13,11 +13,11 @@ cdef extern from "Python.h": bint PyTuple_CheckExact(object p) # Return true if p is a tuple object, but not an instance of a subtype of the tuple type. - object PyTuple_New(Py_ssize_t len) + tuple PyTuple_New(Py_ssize_t len) # Return value: New reference. # Return a new tuple object of size len, or NULL on failure. - object PyTuple_Pack(Py_ssize_t n, ...) + tuple PyTuple_Pack(Py_ssize_t n, ...) # Return value: New reference. # Return a new tuple object of size n, or NULL on failure. The # tuple values are initialized to the subsequent n C arguments @@ -41,7 +41,7 @@ cdef extern from "Python.h": # Return value: Borrowed reference. # Like PyTuple_GetItem(), but does no checking of its arguments. - object PyTuple_GetSlice(object p, Py_ssize_t low, Py_ssize_t high) + tuple PyTuple_GetSlice(object p, Py_ssize_t low, Py_ssize_t high) # Return value: New reference. # Take a slice of the tuple pointed to by p from low to high and return it as a new tuple.