Skip to content

Commit ba373b8

Browse files
authored
Merge pull request #20037 from anntzer/pp37
Don't generate wheels unusable on PyPy7.3.{0,1}.
2 parents 45031fd + 5117211 commit ba373b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ft2font_wrapper.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,10 @@ static PyObject *PyFT2Font_set_text(PyFT2Font *self, PyObject *args, PyObject *k
544544
if (PyUnicode_Check(textobj)) {
545545
size = PyUnicode_GET_LENGTH(textobj);
546546
codepoints.resize(size);
547-
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07030200)
547+
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x07040000)
548+
// PyUnicode_ReadChar is available from PyPy 7.3.2, but wheels do not
549+
// specify the micro-release version, so put the version bound at 7.4
550+
// to prevent generating wheels unusable on PyPy 7.3.{0,1}.
548551
Py_UNICODE *unistr = PyUnicode_AsUnicode(textobj);
549552
for (size_t i = 0; i < size; ++i) {
550553
codepoints[i] = unistr[i];

0 commit comments

Comments
 (0)