Commit 012973c4 authored by Christoph Reiter's avatar Christoph Reiter 馃悕

boxed: don't look up the gtype in tp_dealloc, we already know it

parent 68b4dae3
......@@ -43,7 +43,6 @@ boxed_dealloc (PyGIBoxed *self)
static PyObject *
boxed_del (PyGIBoxed *self)
{
GType g_type;
gpointer boxed = pyg_boxed_get_ptr (self);
if ( ( (PyGBoxed *) self)->free_on_dealloc && boxed != NULL) {
......@@ -52,8 +51,7 @@ boxed_del (PyGIBoxed *self)
self->slice_allocated = FALSE;
self->size = 0;
} else {
g_type = pyg_type_from_object ( (PyObject *) self);
g_boxed_free (g_type, boxed);
g_boxed_free (((PyGBoxed *)self)->gtype, boxed);
}
}
pyg_boxed_set_ptr (self, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment