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:
@@ -58,7 +58,7 @@
|
||||
|
||||
static wmOperatorType *ot_lookup_from_py_string(PyObject *value, const char *py_fn_id)
|
||||
{
|
||||
const char *opname = _PyUnicode_AsString(value);
|
||||
const char *opname = PyUnicode_AsUTF8(value);
|
||||
if (opname == NULL) {
|
||||
PyErr_Format(PyExc_TypeError, "%s() expects a string argument", py_fn_id);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user