From 0c95eddfcf5170380bf84b20a0232ef41d14d821 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 21 Oct 2023 15:18:14 +0200 Subject: [PATCH] Stop using _PyUnicode_AsString() to fix the build with Python 3.13.0a1 It was removed upstream in https://github.com/python/cpython/pull/107021 Fixes #343 --- cairo/enums.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cairo/enums.c b/cairo/enums.c index 37accd0b..272c1c56 100644 --- a/cairo/enums.c +++ b/cairo/enums.c @@ -126,7 +126,7 @@ int_enum_get_name(PyObject *obj) { return NULL; return PyUnicode_FromFormat ("%s.%s", Py_TYPE(obj)->tp_name, - _PyUnicode_AsString(name_obj)); + PyUnicode_AsUTF8(name_obj)); } static PyObject *