Commit 94c710a8 authored by Benjamin Peterson's avatar Benjamin Peterson

don't ready in case_operation, since most callers do it themselves

parent 372debb8
...@@ -9644,8 +9644,7 @@ case_operation(PyObject *self, ...@@ -9644,8 +9644,7 @@ case_operation(PyObject *self,
void *data, *outdata; void *data, *outdata;
Py_UCS4 maxchar = 0, *tmp, *tmpend; Py_UCS4 maxchar = 0, *tmp, *tmpend;
if (PyUnicode_READY(self) == -1) assert(PyUnicode_IS_READY(self));
return NULL;
kind = PyUnicode_KIND(self); kind = PyUnicode_KIND(self);
data = PyUnicode_DATA(self); data = PyUnicode_DATA(self);
...@@ -10512,6 +10511,8 @@ characters, all remaining cased characters have lower case."); ...@@ -10512,6 +10511,8 @@ characters, all remaining cased characters have lower case.");
static PyObject* static PyObject*
unicode_title(PyObject *self) unicode_title(PyObject *self)
{ {
if (PyUnicode_READY(self) == -1)
return NULL;
return case_operation(self, do_title); return case_operation(self, do_title);
} }
...@@ -12657,6 +12658,8 @@ and vice versa."); ...@@ -12657,6 +12658,8 @@ and vice versa.");
static PyObject* static PyObject*
unicode_swapcase(PyObject *self) unicode_swapcase(PyObject *self)
{ {
if (PyUnicode_READY(self) == -1)
return NULL;
return case_operation(self, do_swapcase); return case_operation(self, do_swapcase);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment