summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-06-13 16:57:12 +0000
committerWalter Dörwald <walter@livinglogic.de>2007-06-13 16:57:12 +0000
commit4f84acffbbb72427e479c9bc2fb952a2531774fe (patch)
tree9c9692196cd602ef98ab56377c8a73ccd64e6cd4 /Include
parent52e49e78ba4ca5915063ef3c52d3ee865797c419 (diff)
downloadcpython-4f84acffbbb72427e479c9bc2fb952a2531774fe.tar.gz
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.
Diffstat (limited to 'Include')
-rw-r--r--Include/pyerrors.h4
-rw-r--r--Include/structmember.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 96716926d0..ef7b2521d6 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -34,8 +34,8 @@ typedef struct {
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 e761f6d968..ce5353d515 100644
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -68,6 +68,7 @@ typedef struct PyMemberDef {
#ifdef HAVE_LONG_LONG
#define T_LONGLONG 17
#define T_ULONGLONG 18
+#define T_PYSSIZET 19 /* Py_ssize_t */
#endif /* HAVE_LONG_LONG */
/* Flags */