Add T_PYSSIZET in structmember.h: This can be used for
Py_ssize_t members.
Simplify the implementation of UnicodeError objects:
start and end attributes are now stored directly as
Py_ssize_t members, which simplifies various get and
set functions.
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 9671692..ef7b252 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -34,8 +34,8 @@
PyObject *message;
PyObject *encoding;
PyObject *object;
- PyObject *start;
- PyObject *end;
+ Py_ssize_t start;
+ Py_ssize_t end;
PyObject *reason;
} PyUnicodeErrorObject;
#endif
diff --git a/Include/structmember.h b/Include/structmember.h
index e761f6d..ce5353d 100644
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -68,6 +68,7 @@
#ifdef HAVE_LONG_LONG
#define T_LONGLONG 17
#define T_ULONGLONG 18
+#define T_PYSSIZET 19 /* Py_ssize_t */
#endif /* HAVE_LONG_LONG */
/* Flags */