void* PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices)
# ??
- int PyBuffer_SizeFromFormat(char *) # actually const char
+ Py_ssize_t PyBuffer_SizeFromFormat(char *) # actually const char
# Return the implied ~Py_buffer.itemsize from the struct-stype
# ~Py_buffer.format
void PyBuffer_FillContiguousStrides(int ndims,
Py_ssize_t *shape,
Py_ssize_t *strides,
- int itemsize,
+ Py_ssize_t itemsize,
char fort)
# Fill the strides array with byte-strides of a contiguous
# (Fortran-style if fort is 'F' or C-style otherwise) array of the
# value, return 1, otherwise return 0. On error, return -1. This
# is equivalent to the Python expression "value in o".
- int PySequence_Index(object o, object value) except -1
+ Py_ssize_t PySequence_Index(object o, object value) except -1
# Return the first index i for which o[i] == value. On error,
# return -1. This is equivalent to the Python expression
# "o.index(value)".
# PySequence_Check(o) is true and without adjustment for negative
# indices.
- int PySequence_Fast_GET_SIZE(object o)
+ Py_ssize_t PySequence_Fast_GET_SIZE(object o)
# Returns the length of o, assuming that o was returned by
# PySequence_Fast() and that o is not NULL. The size can also be
# gotten by calling PySequence_Size() on o, but
# The following functions and macros are available for instances
# of set or frozenset or instances of their subtypes.
- int PySet_Size(object anyset) except -1
+ Py_ssize_t PySet_Size(object anyset) except -1
# Return the length of a set or frozenset object. Equivalent to
# "len(anyset)". Raises a PyExc_SystemError if anyset is not a
# set, frozenset, or an instance of a subtype.
- int PySet_GET_SIZE(object anyset)
+ Py_ssize_t PySet_GET_SIZE(object anyset)
# Macro form of PySet_Size() without error checking.
bint PySet_Contains(object anyset, object key) except -1
# pointing to Python objects. "PyTuple_Pack(2, a, b)" is
# equivalent to "Py_BuildValue("(OO)", a, b)".
- int PyTuple_Size(object p) except -1
+ Py_ssize_t PyTuple_Size(object p) except -1
# Take a pointer to a tuple object, and return the size of that tuple.
- int PyTuple_GET_SIZE(object p)
+ Py_ssize_t PyTuple_GET_SIZE(object p)
# Return the size of the tuple p, which must be non-NULL and point
# to a tuple; no error checking is performed.
# consumed is not NULL, PyUnicode_DecodeMBCSStateful() will not
# decode trailing lead byte and the number of bytes that have been
# decoded will be stored in consumed. New in version 2.5.
- object PyUnicode_DecodeMBCSStateful(char *s, int size, char *errors, int *consumed)
+ object PyUnicode_DecodeMBCSStateful(char *s, Py_ssize_t size, char *errors, Py_ssize_t *consumed)
# Encode the Py_UNICODE buffer of the given size using MBCS and
# return a Python string object. Return NULL if an exception was