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_types_customdata.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_types_customdata.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_types_customdata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 96c36f2d788..471a311c411 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -804,7 +804,7 @@ static PyObject *bpy_bmlayercollection_subscript(BPy_BMLayerCollection *self, Py { /* don't need error check here */ if (PyUnicode_Check(key)) { - return bpy_bmlayercollection_subscript_str(self, _PyUnicode_AsString(key)); + return bpy_bmlayercollection_subscript_str(self, PyUnicode_AsUTF8(key)); } if (PyIndex_Check(key)) { const Py_ssize_t i = PyNumber_AsSsize_t(key, PyExc_IndexError); @@ -862,7 +862,7 @@ static PyObject *bpy_bmlayercollection_subscript(BPy_BMLayerCollection *self, Py static int bpy_bmlayercollection_contains(BPy_BMLayerCollection *self, PyObject *value) { - const char *keyname = _PyUnicode_AsString(value); + const char *keyname = PyUnicode_AsUTF8(value); CustomData *data; int index; |