diff --git a/source/blender/python/generic/py_capi_utils.cc b/source/blender/python/generic/py_capi_utils.cc index cfa6a6369de..29b0dff2511 100644 --- a/source/blender/python/generic/py_capi_utils.cc +++ b/source/blender/python/generic/py_capi_utils.cc @@ -33,7 +33,6 @@ #if PY_VERSION_HEX < 0x030d0000 /* <3.13 */ # define PyLong_AsInt _PyLong_AsInt -# define PyUnicode_CompareWithASCIIString _PyUnicode_EqualToASCIIString #endif /* -------------------------------------------------------------------- */ diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc index aa08d0b6bb5..106ace3ff87 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.cc +++ b/source/blender/python/gpu/gpu_py_framebuffer.cc @@ -295,14 +295,14 @@ static bool pygpu_framebuffer_new_parse_arg(PyObject *o, GPUAttachment *r_attach return false; } - if (c_texture && PyUnicode_CompareWithASCIIString(key, c_texture)) { + if (c_texture && PyUnicode_CompareWithASCIIString(key, c_texture) == 0) { /* Compare only once. */ c_texture = nullptr; if (!bpygpu_ParseTexture(value, &tmp_attach.tex)) { return false; } } - else if (c_layer && PyUnicode_CompareWithASCIIString(key, c_layer)) { + else if (c_layer && PyUnicode_CompareWithASCIIString(key, c_layer) == 0) { /* Compare only once. */ c_layer = nullptr; tmp_attach.layer = PyLong_AsLong(value); @@ -310,7 +310,7 @@ static bool pygpu_framebuffer_new_parse_arg(PyObject *o, GPUAttachment *r_attach return false; } } - else if (c_mip && PyUnicode_CompareWithASCIIString(key, c_mip)) { + else if (c_mip && PyUnicode_CompareWithASCIIString(key, c_mip) == 0) { /* Compare only once. */ c_mip = nullptr; tmp_attach.mip = PyLong_AsLong(value);