diff options
Diffstat (limited to 'source/blender/python/generic/imbuf_py_api.c')
-rw-r--r-- | source/blender/python/generic/imbuf_py_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/generic/imbuf_py_api.c b/source/blender/python/generic/imbuf_py_api.c index d05690759ce..fe72f267a5d 100644 --- a/source/blender/python/generic/imbuf_py_api.c +++ b/source/blender/python/generic/imbuf_py_api.c @@ -267,7 +267,7 @@ static int py_imbuf_filepath_set(Py_ImBuf *self, PyObject *value, void *UNUSED(c ImBuf *ibuf = self->ibuf; const Py_ssize_t value_str_len_max = sizeof(ibuf->name); 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_len >= value_str_len_max) { PyErr_Format(PyExc_TypeError, "filepath length over %zd", value_str_len_max - 1); return -1; |