[pygtksourceview/gtksourcecompletion] Fixed crasher in show_completion (invalid cast)



commit 6ef81e205435647b423606b529a4d251bf53d064
Author: Jesse van den Kieboom <jesse icecrew nl>
Date:   Sun Apr 26 11:16:41 2009 +0200

    Fixed crasher in show_completion (invalid cast)
---
 gtksourceview2.override |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gtksourceview2.override b/gtksourceview2.override
index 1871e1d..753d1f5 100644
--- a/gtksourceview2.override
+++ b/gtksourceview2.override
@@ -541,12 +541,13 @@ _wrap_gtk_source_view_show_completion (PyGObject *self,
     }
     
     items = pylist_to_glist_gobjs (providers, GTK_TYPE_SOURCE_COMPLETION_PROVIDER);
-    gtk_source_view_show_completion (GTK_SOURCE_VIEW(self), items);
+    gtk_source_view_show_completion (GTK_SOURCE_VIEW(self->obj), items);
     
     g_list_foreach (items, (GFunc)g_object_unref, NULL);
     g_list_free (items);
         
-    return NULL;
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 %%
@@ -577,8 +578,9 @@ _wrap_gtk_source_completion_show(PyGObject *self,
     
     g_list_foreach (items, (GFunc)g_object_unref, NULL);
     g_list_free (items);
-        
-    return NULL;
+    
+    Py_INCREF(Py_None);
+    return Py_None;
 }
 
 %%



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