Lines 1-88
Link Here
|
1 |
https://gitlab.gnome.org/GNOME/pygobject/-/commit/bfc759c9c0bb |
|
|
2 |
|
3 |
--- gi/gimodule.c.orig 2018-05-31 14:39:04 UTC |
4 |
+++ gi/gimodule.c |
5 |
@@ -685,7 +685,10 @@ PYGLIB_MODULE_START(_gi, "_gi") |
6 |
pygi_error_register_types (module); |
7 |
_pygi_repository_register_types (module); |
8 |
_pygi_info_register_types (module); |
9 |
+ pygobject_type_register_types (module_dict); |
10 |
+ pygobject_pointer_register_types (module_dict); |
11 |
_pygi_struct_register_types (module); |
12 |
+ pygobject_boxed_register_types (module_dict); |
13 |
_pygi_boxed_register_types (module); |
14 |
_pygi_ccallback_register_types (module); |
15 |
pygi_resulttuple_register_types (module); |
16 |
@@ -699,12 +702,9 @@ PYGLIB_MODULE_START(_gi, "_gi") |
17 |
pygobject_register_features (module_dict); |
18 |
pygobject_register_version_tuples (module_dict); |
19 |
pygobject_register_warnings (module_dict); |
20 |
- pygobject_type_register_types (module_dict); |
21 |
pygobject_object_register_types (module_dict); |
22 |
pygobject_interface_register_types (module_dict); |
23 |
pygobject_paramspec_register_types (module_dict); |
24 |
- pygobject_boxed_register_types (module_dict); |
25 |
- pygobject_pointer_register_types (module_dict); |
26 |
pygobject_enum_register_types (module_dict); |
27 |
pygobject_flags_register_types (module_dict); |
28 |
|
29 |
--- gi/pygboxed.c.orig 2018-05-31 14:39:04 UTC |
30 |
+++ gi/pygboxed.c |
31 |
@@ -162,6 +162,7 @@ pyg_register_boxed(PyObject *dict, const gchar *class_ |
32 |
if (!type->tp_dealloc) type->tp_dealloc = (destructor)pyg_boxed_dealloc; |
33 |
|
34 |
Py_TYPE(type) = &PyType_Type; |
35 |
+ g_assert (Py_TYPE (&PyGBoxed_Type) != NULL); |
36 |
type->tp_base = &PyGBoxed_Type; |
37 |
|
38 |
if (PyType_Ready(type) < 0) { |
39 |
--- gi/pygi-boxed.c.orig 2018-05-31 14:39:04 UTC |
40 |
+++ gi/pygi-boxed.c |
41 |
@@ -230,6 +230,7 @@ void |
42 |
_pygi_boxed_register_types (PyObject *m) |
43 |
{ |
44 |
Py_TYPE(&PyGIBoxed_Type) = &PyType_Type; |
45 |
+ g_assert (Py_TYPE (&PyGBoxed_Type) != NULL); |
46 |
PyGIBoxed_Type.tp_base = &PyGBoxed_Type; |
47 |
PyGIBoxed_Type.tp_new = (newfunc) _boxed_new; |
48 |
PyGIBoxed_Type.tp_init = (initproc) _boxed_init; |
49 |
--- gi/pygi-struct.c.orig 2018-05-31 14:39:04 UTC |
50 |
+++ gi/pygi-struct.c |
51 |
@@ -231,6 +231,7 @@ void |
52 |
_pygi_struct_register_types (PyObject *m) |
53 |
{ |
54 |
Py_TYPE(&PyGIStruct_Type) = &PyType_Type; |
55 |
+ g_assert (Py_TYPE (&PyGPointer_Type) != NULL); |
56 |
PyGIStruct_Type.tp_base = &PyGPointer_Type; |
57 |
PyGIStruct_Type.tp_new = (newfunc) _struct_new; |
58 |
PyGIStruct_Type.tp_init = (initproc) _struct_init; |
59 |
--- gi/pyginterface.c.orig 2018-05-31 14:39:04 UTC |
60 |
+++ gi/pyginterface.c |
61 |
@@ -72,6 +72,7 @@ pyg_register_interface(PyObject *dict, const gchar *cl |
62 |
PyObject *o; |
63 |
|
64 |
Py_TYPE(type) = &PyType_Type; |
65 |
+ g_assert (Py_TYPE (&PyGInterface_Type) != NULL); |
66 |
type->tp_base = &PyGInterface_Type; |
67 |
|
68 |
if (PyType_Ready(type) < 0) { |
69 |
--- gi/pygpointer.c.orig 2018-05-31 14:39:04 UTC |
70 |
+++ gi/pygpointer.c |
71 |
@@ -117,6 +117,7 @@ pyg_register_pointer(PyObject *dict, const gchar *clas |
72 |
if (!type->tp_dealloc) type->tp_dealloc = (destructor)pyg_pointer_dealloc; |
73 |
|
74 |
Py_TYPE(type) = &PyType_Type; |
75 |
+ g_assert (Py_TYPE (&PyGPointer_Type) != NULL); |
76 |
type->tp_base = &PyGPointer_Type; |
77 |
|
78 |
if (PyType_Ready(type) < 0) { |
79 |
--- gi/pygtype.c.orig 2018-05-31 14:39:04 UTC |
80 |
+++ gi/pygtype.c |
81 |
@@ -345,6 +345,7 @@ pyg_type_wrapper_new(GType type) |
82 |
{ |
83 |
PyGTypeWrapper *self; |
84 |
|
85 |
+ g_assert (Py_TYPE (&PyGTypeWrapper_Type) != NULL); |
86 |
self = (PyGTypeWrapper *)PyObject_NEW(PyGTypeWrapper, |
87 |
&PyGTypeWrapper_Type); |
88 |
if (self == NULL) |