diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-13 16:57:12 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-13 16:57:12 (GMT) |
commit | 84a3efec37bb97877f247b3e462bc48432e09b9f (patch) | |
tree | 6f8a907588dcfa23f0805233895c3502e674f4f1 /Include | |
parent | 22000cbd6b1a2ddf5f1c4e3c3a6db78ad9f908db (diff) | |
download | cpython-84a3efec37bb97877f247b3e462bc48432e09b9f.zip cpython-84a3efec37bb97877f247b3e462bc48432e09b9f.tar.gz cpython-84a3efec37bb97877f247b3e462bc48432e09b9f.tar.bz2 |
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.h | 4 | ||||
-rw-r--r-- | Include/structmember.h | 1 |
2 files changed, 3 insertions, 2 deletions
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 @@ 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 e761f6d..ce5353d 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 */ |