[pygobject] functions: revert the function init order to make pylint happy again. See #217
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] functions: revert the function init order to make pylint happy again. See #217
- Date: Thu, 16 Aug 2018 15:26:44 +0000 (UTC)
commit 789768695f4fe7433e010e1d43e8b74160e10dfc
Author: Christoph Reiter <reiter christoph gmail com>
Date: Thu Aug 16 17:16:22 2018 +0200
functions: revert the function init order to make pylint happy again. See #217
While this is not correct (and crashes with PyPy, thus the ifdeffery) it makes
pylint happy. Do this for now until we figure out what confuses pylint here.
gi/pygi-info.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 70101587..4fca825a 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -2308,10 +2308,18 @@ pygi_info_register_types (PyObject *m)
_PyGI_REGISTER_TYPE (m, PyGICallableInfo_Type, CallableInfo,
PyGIBaseInfo_Type);
+ // FIXME: this is to work around a pylint issue
+ // https://gitlab.gnome.org/GNOME/pygobject/issues/217
+#ifndef PYPY_VERSION
+ _PyGI_REGISTER_TYPE (m, PyGIFunctionInfo_Type, FunctionInfo,
+ PyGICallableInfo_Type);
+#endif
PyGIFunctionInfo_Type.tp_call = (ternaryfunc) _function_info_call;
PyGIFunctionInfo_Type.tp_descr_get = (descrgetfunc) _function_info_descr_get;
+#ifdef PYPY_VERSION
_PyGI_REGISTER_TYPE (m, PyGIFunctionInfo_Type, FunctionInfo,
PyGICallableInfo_Type);
+#endif
PyGIVFuncInfo_Type.tp_descr_get = (descrgetfunc) _vfunc_info_descr_get;
_PyGI_REGISTER_TYPE (m, PyGIVFuncInfo_Type, VFuncInfo,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]