[pygobject] Remove pygobject_register_features()
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Remove pygobject_register_features()
- Date: Thu, 22 Mar 2018 07:04:35 +0000 (UTC)
commit 610dd76e8c6f5dcec0726544fccb81219d03f4b7
Author: Christoph Reiter <reiter christoph gmail com>
Date: Wed Mar 21 09:46:17 2018 +0100
Remove pygobject_register_features()
All it does is provide GObject.features which we can do in the overrides directly.
gi/gimodule.c | 1 -
gi/gobjectmodule.c | 12 ------------
gi/gobjectmodule.h | 1 -
gi/overrides/GObject.py | 2 +-
tests/test_signal.py | 10 +++-------
5 files changed, 4 insertions(+), 22 deletions(-)
---
diff --git a/gi/gimodule.c b/gi/gimodule.c
index 4604caf3..c551fffa 100644
--- a/gi/gimodule.c
+++ b/gi/gimodule.c
@@ -694,7 +694,6 @@ PYGLIB_MODULE_START(_gi, "_gi")
pygobject_register_api (module_dict);
pygobject_register_constants (module);
- pygobject_register_features (module_dict);
pygobject_register_version_tuples (module_dict);
pygobject_register_warnings (module_dict);
pygobject_type_register_types (module_dict);
diff --git a/gi/gobjectmodule.c b/gi/gobjectmodule.c
index 76923ea3..8f6f0d69 100644
--- a/gi/gobjectmodule.c
+++ b/gi/gobjectmodule.c
@@ -1943,18 +1943,6 @@ pygobject_register_constants(PyObject *m)
PyModule_AddObject(m, "TYPE_GSTRING", pyg_type_wrapper_new(G_TYPE_GSTRING));
}
-/* features */
-void
-pygobject_register_features(PyObject *d)
-{
- PyObject *features;
-
- features = PyDict_New();
- PyDict_SetItemString(features, "generic-c-marshaller", Py_True);
- PyDict_SetItemString(d, "features", features);
- Py_DECREF(features);
-}
-
void
pygobject_register_version_tuples(PyObject *d)
{
diff --git a/gi/gobjectmodule.h b/gi/gobjectmodule.h
index 9c7a4b81..13f2d942 100644
--- a/gi/gobjectmodule.h
+++ b/gi/gobjectmodule.h
@@ -10,7 +10,6 @@ int pygobject_constructv (PyGObject *self,
void pygobject_register_api (PyObject *d);
void pygobject_register_constants (PyObject *m);
-void pygobject_register_features (PyObject *d);
void pygobject_register_version_tuples (PyObject *d);
void pygobject_register_warnings (PyObject *d);
diff --git a/gi/overrides/GObject.py b/gi/overrides/GObject.py
index c252bfac..0d5a70ef 100644
--- a/gi/overrides/GObject.py
+++ b/gi/overrides/GObject.py
@@ -199,7 +199,7 @@ __all__ += ['GBoxed', 'GEnum', 'GFlags', 'GInterface', 'GObject',
'Warning']
-features = _gi.features
+features = {'generic-c-marshaller': True}
list_properties = _gi.list_properties
new = _gi.new
pygobject_version = _gi.pygobject_version
diff --git a/tests/test_signal.py b/tests/test_signal.py
index 35fc8ef3..46ff1dca 100644
--- a/tests/test_signal.py
+++ b/tests/test_signal.py
@@ -658,13 +658,9 @@ class _TestCMarshaller:
"hello")
-if 'generic-c-marshaller' in GObject.features:
- class TestCMarshaller(_TestCMarshaller, unittest.TestCase):
- pass
-else:
- print()
- print('** WARNING: LIBFFI disabled, not testing')
- print()
+class TestCMarshaller(_TestCMarshaller, unittest.TestCase):
+ pass
+
# Test for 374653
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]