Fix T85573: Building with Python 3.10a5 fails

Replace deprecated _PyUnicode_AsString{AndSize} usage.

T83626 still needs to be resolved before 3.10 is usable.
This commit is contained in:
2021-02-13 22:57:01 +11:00
parent 32660201ac
commit dae445d94a
25 changed files with 96 additions and 97 deletions

View File

@@ -361,7 +361,7 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args))
for (i = 0; i < size; i++) {
PyObject *item_src = PyList_GET_ITEM(ls, i);
PyObject *item_dst; /* must be set below */
const char *item_idname = _PyUnicode_AsString(item_src);
const char *item_idname = PyUnicode_AsUTF8(item_src);
// printf(" %s\n", item_idname);