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 /intern/cycles | |
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 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_python.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index 5646bd5b2eb..0daad310543 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -147,7 +147,7 @@ void python_thread_state_restore(void **python_thread_state) static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce) { - const char *result = _PyUnicode_AsString(py_str); + const char *result = PyUnicode_AsUTF8(py_str); if (result) { /* 99% of the time this is enough but we better support non unicode * chars since blender doesn't limit this. |