Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-02-13 14:57:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-13 15:09:55 +0300
commitdae445d94a7a5e1ad38719ea05e5bb0bc76ede84 (patch)
tree5f174cb170079ac62eaf521cb3cec2535162e6bf /source/blender/python/intern/bpy.c
parent32660201acaa1138c0fed6ef3fa38f69daa3dac3 (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/intern/bpy.c')
-rw-r--r--source/blender/python/intern/bpy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c
index 6462f8320d7..74fc8bcfec9 100644
--- a/source/blender/python/intern/bpy.c
+++ b/source/blender/python/intern/bpy.c
@@ -261,7 +261,7 @@ PyDoc_STRVAR(bpy_escape_identifier_doc,
static PyObject *bpy_escape_identifier(PyObject *UNUSED(self), PyObject *value)
{
Py_ssize_t value_str_len;
- const char *value_str = _PyUnicode_AsStringAndSize(value, &value_str_len);
+ const char *value_str = PyUnicode_AsUTF8AndSize(value, &value_str_len);
if (value_str == NULL) {
PyErr_SetString(PyExc_TypeError, "expected a string");
@@ -299,7 +299,7 @@ PyDoc_STRVAR(bpy_unescape_identifier_doc,
static PyObject *bpy_unescape_identifier(PyObject *UNUSED(self), PyObject *value)
{
Py_ssize_t value_str_len;
- const char *value_str = _PyUnicode_AsStringAndSize(value, &value_str_len);
+ const char *value_str = PyUnicode_AsUTF8AndSize(value, &value_str_len);
if (value_str == NULL) {
PyErr_SetString(PyExc_TypeError, "expected a string");