--- a/Pyrex/Compiler/TypeSlots.py 2007-10-05 10:18:32.000000000 +0100 +++ b/Pyrex/Compiler/TypeSlots.py 2007-11-16 20:11:26.000000000 +0000 @@ -27,6 +27,7 @@ # 'I' int * # 'l' long # 'Z' Py_ssize_t + # 'Z1' Py_ssize_t But '-1' is the error code # 's' char * # 'S' char ** # 'r' int used only to signal exception @@ -44,6 +45,7 @@ 'I': PyrexTypes.c_int_ptr_type, 'l': PyrexTypes.c_long_type, 'Z': PyrexTypes.c_py_ssize_t_type, + 'Z1': PyrexTypes.c_py_ssize_t_type, 's': PyrexTypes.c_char_ptr_type, 'S': PyrexTypes.c_char_ptr_ptr_type, 'r': PyrexTypes.c_returncode_type, @@ -56,6 +58,7 @@ 'i': "-1", 'l': "-1", 'r': "-1", + 'Z1': "-1", } def __init__(self, arg_format, ret_format): @@ -376,7 +379,7 @@ iternaryfunc = Signature("TOO", "O") # typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); callfunc = Signature("T*", "O") # typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); inquiry = Signature("T", "i") # typedef int (*inquiry)(PyObject *); -lenfunc = Signature("T", "Z") # typedef Py_ssize_t (*lenfunc)(PyObject *); +lenfunc = Signature("T", "Z1") # typedef Py_ssize_t (*lenfunc)(PyObject *); # typedef int (*coercion)(PyObject **, PyObject **); intargfunc = Signature("Ti", "O") # typedef PyObject *(*intargfunc)(PyObject *, int); ssizeargfunc = Signature("TZ", "O") # typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);