From dda0e9ba1da5e58e324b1d14cda02a7c1fc773e6 Mon Sep 17 00:00:00 2001 From: Havard Graff Date: Tue, 13 Mar 2018 14:39:54 +0100 Subject: pygi-info: use PYGLIB_PyBytes_AsString instead of checking --- gi/pygi-info.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gi/pygi-info.c b/gi/pygi-info.c index 4bd4c1cc..70101587 100644 --- a/gi/pygi-info.c +++ b/gi/pygi-info.c @@ -600,12 +600,7 @@ _function_info_call (PyGICallableInfo *self, PyObject *args, PyObject *kwargs) py_str_name = tmp; } -#if PY_VERSION_HEX < 0x03000000 - str_name = PyString_AsString (py_str_name); -#else - str_name = PyBytes_AsString (py_str_name); -#endif - + str_name = PYGLIB_PyBytes_AsString (py_str_name); if (strcmp (str_name, _safe_base_info_get_name (container_info))) { PyErr_Format (PyExc_TypeError, "%s constructor cannot be used to create instances of " -- cgit v1.2.1