[pygobject] Revert "pygi-boxed: make in-place copy safer"
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Revert "pygi-boxed: make in-place copy safer"
- Date: Tue, 13 Feb 2018 23:05:50 +0000 (UTC)
commit 700c785367975995d24a8ffd00b2aa028ccf77e8
Author: Christoph Reiter <reiter christoph gmail com>
Date: Tue Feb 13 23:26:15 2018 +0100
Revert "pygi-boxed: make in-place copy safer"
This reverts commit 9d96df1ea3ad533885fbcae4de693a3cd81e765a.
gi/pygi-boxed.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/gi/pygi-boxed.c b/gi/pygi-boxed.c
index 599d6d3e..fa690bb3 100644
--- a/gi/pygi-boxed.c
+++ b/gi/pygi-boxed.c
@@ -42,8 +42,6 @@ boxed_del (PyGIBoxed *self)
if ( ( (PyGBoxed *) self)->free_on_dealloc && boxed != NULL) {
if (self->slice_allocated) {
g_slice_free1 (self->size, boxed);
- self->slice_allocated = FALSE;
- self->size = 0;
} else {
g_type = pyg_type_from_object ( (PyObject *) self);
g_boxed_free (g_type, boxed);
@@ -205,11 +203,7 @@ void
_pygi_boxed_copy_in_place (PyGIBoxed *self)
{
PyGBoxed *pygboxed = (PyGBoxed *)self;
- gpointer ptr = pyg_boxed_get_ptr (self);
- gpointer copy = NULL;
-
- if (ptr)
- copy = g_boxed_copy (pygboxed->gtype, ptr);
+ gpointer copy = g_boxed_copy (pygboxed->gtype, pyg_boxed_get_ptr (self));
boxed_del (self);
pyg_boxed_set_ptr (pygboxed, copy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]