@@ -575,19 +575,9 @@ static PyObject *PyFT2Font_get_fontmap(PyFT2Font *self, PyObject *args, PyObject
575575
576576 if (PyUnicode_Check (textobj)) {
577577 size = PyUnicode_GET_LENGTH (textobj);
578- #if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
579- // PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
580- // specify the micro-release version, so put the version bound at 7.4
581- // to prevent generating wheels unusable on PyPy 7.3.{0,1}.
582- Py_UNICODE *unistr = PyUnicode_AsUnicode (textobj);
583- for (size_t i = 0 ; i < size; ++i) {
584- codepoints.insert (unistr[i]);
585- }
586- #else
587578 for (size_t i = 0 ; i < size; ++i) {
588579 codepoints.insert (PyUnicode_ReadChar (textobj, i));
589580 }
590- #endif
591581 } else {
592582 PyErr_SetString (PyExc_TypeError, " string must be str" );
593583 return NULL ;
@@ -656,19 +646,9 @@ static PyObject *PyFT2Font_set_text(PyFT2Font *self, PyObject *args, PyObject *k
656646 if (PyUnicode_Check (textobj)) {
657647 size = PyUnicode_GET_LENGTH (textobj);
658648 codepoints.resize (size);
659- #if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
660- // PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
661- // specify the micro-release version, so put the version bound at 7.4
662- // to prevent generating wheels unusable on PyPy 7.3.{0,1}.
663- Py_UNICODE *unistr = PyUnicode_AsUnicode (textobj);
664- for (size_t i = 0 ; i < size; ++i) {
665- codepoints[i] = unistr[i];
666- }
667- #else
668649 for (size_t i = 0 ; i < size; ++i) {
669650 codepoints[i] = PyUnicode_ReadChar (textobj, i);
670651 }
671- #endif
672652 } else {
673653 PyErr_SetString (PyExc_TypeError, " set_text requires str-input." );
674654 return NULL ;
0 commit comments