diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-02-13 14:57:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-02-13 15:09:55 +0300 |
commit | dae445d94a7a5e1ad38719ea05e5bb0bc76ede84 (patch) | |
tree | 5f174cb170079ac62eaf521cb3cec2535162e6bf /source/blender/python/bmesh/bmesh_py_ops_call.c | |
parent | 32660201acaa1138c0fed6ef3fa38f69daa3dac3 (diff) |
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.
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_ops_call.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_ops_call.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.c b/source/blender/python/bmesh/bmesh_py_ops_call.c index d0676ec1947..28daf08507d 100644 --- a/source/blender/python/bmesh/bmesh_py_ops_call.c +++ b/source/blender/python/bmesh/bmesh_py_ops_call.c @@ -184,7 +184,7 @@ static int bpy_slot_from_py(BMesh *bm, if (slot->slot_subtype.intg == BMO_OP_SLOT_SUBTYPE_INT_ENUM) { int enum_val = -1; PyC_FlagSet *items = (PyC_FlagSet *)slot->data.enum_data.flags; - const char *enum_str = _PyUnicode_AsString(value); + const char *enum_str = PyUnicode_AsUTF8(value); if (enum_str == NULL) { PyErr_Format(PyExc_TypeError, @@ -787,7 +787,7 @@ PyObject *BPy_BMO_call(BPy_BMeshOpFunc *self, PyObject *args, PyObject *kw) PyObject *key, *value; Py_ssize_t pos = 0; while (PyDict_Next(kw, &pos, &key, &value)) { - const char *slot_name = _PyUnicode_AsString(key); + const char *slot_name = PyUnicode_AsUTF8(key); BMOpSlot *slot; if (!BMO_slot_exists(bmop.slots_in, slot_name)) { |