[gnome-builder] buffer: manually set (va)marshaller



commit ab02d794c071e7e4035898c6b71d8315aacb4894
Author: Christian Hergert <chergert redhat com>
Date:   Wed Oct 11 18:07:59 2017 -0700

    buffer: manually set (va)marshaller
    
    These are hit pretty frequently, so might as well set the
    specific marshaller and also ensure we set static scope on the
    passed GtkTextIter as it is const.

 src/libide/buffers/ide-buffer.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/libide/buffers/ide-buffer.c b/src/libide/buffers/ide-buffer.c
index 19e0c6f..cf66e1d 100644
--- a/src/libide/buffers/ide-buffer.c
+++ b/src/libide/buffers/ide-buffer.c
@@ -1650,7 +1650,13 @@ ide_buffer_class_init (IdeBufferClass *klass)
     g_signal_new ("change-settled",
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
-                  0, NULL, NULL, NULL, G_TYPE_NONE, 0);
+                  0,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__VOID,
+                  G_TYPE_NONE, 0);
+  g_signal_set_va_marshaller (signals [CHANGE_SETTLED],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__VOIDv);
 
   /**
    * IdeBuffer::cursor-moved:
@@ -1666,10 +1672,14 @@ ide_buffer_class_init (IdeBufferClass *klass)
                   G_TYPE_FROM_CLASS (klass),
                   G_SIGNAL_RUN_LAST,
                   G_STRUCT_OFFSET (IdeBufferClass, cursor_moved),
-                  NULL, NULL, NULL,
+                  NULL, NULL,
+                  g_cclosure_marshal_VOID__BOXED,
                   G_TYPE_NONE,
                   1,
-                  GTK_TYPE_TEXT_ITER);
+                  GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE);
+  g_signal_set_va_marshaller (signals [CURSOR_MOVED],
+                              G_TYPE_FROM_CLASS (klass),
+                              g_cclosure_marshal_VOID__BOXEDv);
 
   /**
    * IdeBuffer::line-flags-changed:


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