summaryrefslogtreecommitdiff
path: root/controller.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2012-02-11 22:38:17 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2012-02-11 22:41:33 +0100
commitae53d0a5971121e03a07c469e39ff3cfa34a2111 (patch)
tree80f978fc2a0f6ca630409cc0ba08f9101d60fa21 /controller.c
parent56bf4c20afc2785f8cdf75e386159e23fa2c1acf (diff)
downloadlibsigrokdecode-ae53d0a5971121e03a07c469e39ff3cfa34a2111.tar.gz
libsigrokdecode-ae53d0a5971121e03a07c469e39ff3cfa34a2111.zip
srd: Every callback should have a 'void *' parameter.
This is required in various situations and for various lib users, especially so GUIs which might want to pass specific info via this mechanism.
Diffstat (limited to 'controller.c')
-rw-r--r--controller.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/controller.c b/controller.c
index d4637f3..6e6e435 100644
--- a/controller.c
+++ b/controller.c
@@ -692,7 +692,8 @@ SRD_API int srd_session_feed(uint64_t start_samplenum, uint8_t * inbuf,
return SRD_OK;
}
-SRD_API int srd_register_callback(int output_type, srd_pd_output_callback_t cb)
+SRD_API int srd_register_callback(int output_type,
+ srd_pd_output_callback_t cb, void *data)
{
struct srd_pd_callback *pd_cb;
@@ -705,6 +706,7 @@ SRD_API int srd_register_callback(int output_type, srd_pd_output_callback_t cb)
pd_cb->output_type = output_type;
pd_cb->callback = cb;
+ pd_cb->data = data;
callbacks = g_slist_append(callbacks, pd_cb);
return SRD_OK;