summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index a1b79a8..37b7875 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1273,7 +1273,7 @@ PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start)
if (!obj)
return -1;
*start = ((PyUnicodeErrorObject *)exc)->start;
- size = PyUnicode_GET_SIZE(obj);
+ size = PyUnicode_GET_LENGTH(obj);
if (*start<0)
*start = 0; /*XXX check for values <0*/
if (*start>=size)
@@ -1341,7 +1341,7 @@ PyUnicodeEncodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
if (!obj)
return -1;
*end = ((PyUnicodeErrorObject *)exc)->end;
- size = PyUnicode_GET_SIZE(obj);
+ size = PyUnicode_GET_LENGTH(obj);
if (*end<1)
*end = 1;
if (*end>size)