[at-spi2-core] Make AtspiEventListenerCb not call for a const datum
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Make AtspiEventListenerCb not call for a const datum
- Date: Thu, 10 Oct 2013 18:47:24 +0000 (UTC)
commit 7655e875bade67f5cf3e8ab2e9776e66d9517658
Author: Mike Gorse <mgorse suse com>
Date: Thu Oct 10 13:31:31 2013 -0500
Make AtspiEventListenerCb not call for a const datum
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 | 2 +-
atspi/atspi-event-listener.h | 2 +-
test/memory.c | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/atspi/atspi-event-listener.c b/atspi/atspi-event-listener.c
index 1291d11..a7a2336 100644
--- a/atspi/atspi-event-listener.c
+++ b/atspi/atspi-event-listener.c
@@ -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);
diff --git a/atspi/atspi-event-listener.h b/atspi/atspi-event-listener.h
index 99f3ca1..12d3c58 100644
--- a/atspi/atspi-event-listener.h
+++ b/atspi/atspi-event-listener.h
@@ -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);
/**
diff --git a/test/memory.c b/test/memory.c
index 7a8aff5..75cdd93 100644
--- a/test/memory.c
+++ b/test/memory.c
@@ -65,6 +65,7 @@ on_event (AtspiEvent *event, void *data)
g_boxed_free (ATSPI_TYPE_EVENT, event);
}
+int
main()
{
atspi_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]