Skip to content

Commit

Permalink
Oops. Used by mistake PyUnicode_GetSize() directly instead of our own…
Browse files Browse the repository at this point in the history
… PyText_GetSize(), which is correctly #defined to the right function depending on the version of Python.
  • Loading branch information
arigo committed Sep 13, 2023
1 parent b30573d commit 4f29a2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c/_cffi_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -4515,7 +4515,7 @@ static void *b_do_dlopen(PyObject *args, const char **p_printable_filename,
if (*p_printable_filename == NULL)
return NULL;

sz1 = PyUnicode_GetSize(filename_unicode) + 1;
sz1 = PyText_GetSize(filename_unicode) + 1;
sz1 *= 2; /* should not be needed, but you never know */
w1 = alloca(sizeof(wchar_t) * sz1);
sz1 = PyUnicode_AsWideChar((PyUnicodeObject *)filename_unicode,
Expand Down

0 comments on commit 4f29a2b

Please sign in to comment.