Make AtspiEventListenerCb not call for a const datum
authorMike Gorse <mgorse@suse.com>
Thu, 10 Oct 2013 18:31:31 +0000 (13:31 -0500)
committerMike Gorse <mgorse@suse.com>
Thu, 10 Oct 2013 18:31:31 +0000 (13:31 -0500)
AtspiEventListenerCb is currently defined as (transfer
full), so the caller owns the struct and needs to free it, so it should not be const.

atspi/atspi-event-listener.c
atspi/atspi-event-listener.h
test/memory.c

index 1291d11..a7a2336 100644 (file)
@@ -50,7 +50,7 @@ atspi_event_listener_class_init (AtspiEventListenerClass *klass)
 }
 
 static void
-remove_datum (const AtspiEvent *event, void *user_data)
+remove_datum (AtspiEvent *event, void *user_data)
 {
   AtspiEventListenerSimpleCB cb = user_data;
   cb (event);
index 99f3ca1..12d3c58 100644 (file)
@@ -42,7 +42,7 @@ GType atspi_event_get_type (void);
  * A function prototype for callbacks via which clients are notified of AT-SPI events.
  * 
  **/
-typedef void       (*AtspiEventListenerCB)     (const AtspiEvent     *event,
+typedef void       (*AtspiEventListenerCB)     (AtspiEvent     *event,
                                                     void                      *user_data);
 
 /**
index 7a8aff5..75cdd93 100644 (file)
@@ -65,6 +65,7 @@ on_event (AtspiEvent *event, void *data)
   g_boxed_free (ATSPI_TYPE_EVENT, event);
 }
 
+int
 main()
 {
   atspi_init ();