summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHavard Graff <havard.graff@gmail.com>2018-03-13 14:39:54 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-04-30 17:30:39 +0200
commitdda0e9ba1da5e58e324b1d14cda02a7c1fc773e6 (patch)
treef0be0221ee6903379373c4137ca0a42fe3841aa8
parentc2bc39a3264d1e2010cd9b035b2e71483406e9fa (diff)
downloadpygobject-dda0e9ba1da5e58e324b1d14cda02a7c1fc773e6.tar.gz
pygi-info: use PYGLIB_PyBytes_AsString instead of checking
-rw-r--r--gi/pygi-info.c7
1 files changed, 1 insertions, 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 "