diff options
Diffstat (limited to 'plugins/pychrysa/quirks.c')
-rw-r--r-- | plugins/pychrysa/quirks.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/plugins/pychrysa/quirks.c b/plugins/pychrysa/quirks.c index 4dcae2c..0e35f57 100644 --- a/plugins/pychrysa/quirks.c +++ b/plugins/pychrysa/quirks.c @@ -55,7 +55,7 @@ static void pygobject_data_free_fake(PyGObjectData_fake *data) PyGILState_STATE state; /* Etat interne de Python */ GSList *iter; /* Boucle de parcours */ - state = pyglib_gil_state_ensure(); + //state = pyglib_gil_state_ensure(); Py_DECREF(data->type); @@ -77,7 +77,7 @@ static void pygobject_data_free_fake(PyGObjectData_fake *data) g_free(data); - pyglib_gil_state_release(state); + //pyglib_gil_state_release(state); } @@ -94,6 +94,9 @@ static PyGObjectData_fake *pygobject_data_new_fake(void) } +static GObject *_ref = NULL; + + /****************************************************************************** * * @@ -146,3 +149,28 @@ void pychrysalide_set_instance_data(GObject *obj, PyTypeObject *type) } } + + +/****************************************************************************** +* * +* Paramètres : ref = espace de référencement global à utiliser. * +* * +* Description : Evite à Python d'avoir à manipuler les références internes. * +* * +* Retour : Adresse de l'espace de référencement global. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GObject *_get_internal_ref(GObject *ref) +{ + if (ref != NULL) + { + g_object_ref(ref); + _ref = ref; + } + + return _ref; + +} |