}
-static GStaticPrivate pygobject_construction_wrapper = G_STATIC_PRIVATE_INIT;
+static GPrivate pygobject_construction_wrapper;
static inline void
pygobject_init_wrapper_set(PyObject *wrapper)
{
- g_static_private_set(&pygobject_construction_wrapper, wrapper, NULL);
+ g_private_set(&pygobject_construction_wrapper, wrapper);
}
static inline PyObject *
pygobject_init_wrapper_get(void)
{
- return (PyObject *) g_static_private_get(&pygobject_construction_wrapper);
+ return (PyObject *) g_private_get(&pygobject_construction_wrapper);
}
int
* now */
PyGILState_STATE state;
state = pyglib_gil_state_ensure();
- wrapper = pygobject_new_full(object, FALSE, g_class);
+ wrapper = pygobject_new_full(object, TRUE, g_class);
/* float the wrapper ref here because we are going to orphan it
* so we don't destroy the wrapper. The next call to pygobject_new_full
if (obj) {
pygobject_sink (obj);
- self = (PyGObject *) pygobject_new_full((GObject *)obj, FALSE, NULL);
+ self = (PyGObject *) pygobject_new_full((GObject *)obj, TRUE, NULL);
g_object_unref(obj);
} else
self = NULL;
pyg_gerror_exception_check,
pyglib_option_group_new,
- pyg_type_from_object_strict
+ pyg_type_from_object_strict,
+
+ pygobject_new_full
};
/* for addon libraries ... */
{
PyObject *d;
+#if !defined(GLIB_VERSION_2_36)
g_type_init();
+#endif
pyglib_init();
d = PyModule_GetDict(module);