diff options
author | Havard Graff <havard.graff@gmail.com> | 2018-03-13 14:39:54 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-04-30 17:30:39 +0200 |
commit | dda0e9ba1da5e58e324b1d14cda02a7c1fc773e6 (patch) | |
tree | f0be0221ee6903379373c4137ca0a42fe3841aa8 | |
parent | c2bc39a3264d1e2010cd9b035b2e71483406e9fa (diff) | |
download | pygobject-dda0e9ba1da5e58e324b1d14cda02a7c1fc773e6.tar.gz |
pygi-info: use PYGLIB_PyBytes_AsString instead of checking
-rw-r--r-- | gi/pygi-info.c | 7 |
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 " |