[nautilus-python] Don't decrement the obj reference count here. Fixes some PyThreadState_New segmentation faults



commit 262d9f8d0d062dbbaee6e013805679175311dbe5
Author: Adam Plumb <adamplumb gmail com>
Date:   Thu Jan 14 15:12:08 2010 -0500

    Don't decrement the obj reference count here.  Fixes some PyThreadState_New segmentation faults

 src/nautilus-python-object.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-python-object.c b/src/nautilus-python-object.c
index 56f03d9..3d67505 100644
--- a/src/nautilus-python-object.c
+++ b/src/nautilus-python-object.c
@@ -67,9 +67,7 @@ static GObjectClass *parent_class;
         py_files = PyList_New(0);                                      \
 		for (l = files; l; l = l->next)                                \
 		{                                                              \
-            PyObject *obj = pygobject_new((GObject*)l->data);          \
-			PyList_Append(py_files, obj);							   \
-			Py_DECREF(obj);                                            \
+			PyList_Append(py_files, pygobject_new((GObject*)l->data)); \
 		}                                                              \
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]