]> sigrok.org Git - libsigrokdecode.git/blobdiff - type_decoder.c
Use frontend-registered callback with correct parameters
[libsigrokdecode.git] / type_decoder.c
index 16675bcb9f0a136560d15c1cb70ddba91a5e3daf..3f4bae9d774742f791f3ec6d27b81041408ac59d 100644 (file)
@@ -95,7 +95,7 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
        struct srd_proto_data *pdata;
        uint64_t start_sample, end_sample;
        int output_id;
-       void (*cb)();
+       struct srd_pd_callback *cb;
 
        if (!(di = srd_inst_find_by_obj(NULL, self))) {
                /* Shouldn't happen. */
@@ -142,7 +142,7 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
                                /* An error was already logged. */
                                break;
                        }
-                       cb(pdata);
+                       cb->cb(pdata, cb->cb_data);
                }
                break;
        case SRD_OUTPUT_PROTO: