X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=type_decoder.c;h=3efba41ed154dde9254a9a03afd8b4a77d2066fd;hb=12b5e28ecccaaff12a4339867b5bbcd533b1e1fc;hp=6e34dff4f3c12d84ed39691ed1cf7d4d2d9f5c02;hpb=2072ae0c89fec6b06cc579a6c584e67e2a59f7ec;p=libsigrokdecode.git
diff --git a/type_decoder.c b/type_decoder.c
index 6e34dff..3efba41 100644
--- a/type_decoder.c
+++ b/type_decoder.c
@@ -17,6 +17,7 @@
* along with this program. If not, see .
*/
+#include
#include "sigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
#include "sigrokdecode-internal.h"
#include "config.h"
@@ -97,7 +98,7 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
if (!(di = srd_instance_find_by_obj(NULL, self))) {
/* Shouldn't happen. */
- srd_dbg("srd: put(): self instance not found.");
+ srd_dbg("put(): self instance not found.");
return NULL;
}
@@ -114,8 +115,9 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
}
pdo = l->data;
- srd_spew("srd: instance %s put %d-%d %s on oid %d", di->instance_id,
- start_sample, end_sample, OUTPUT_TYPES[pdo->output_type], output_id);
+ srd_spew("Instance %s put %" PRIu64 "-%" PRIu64 " %s on oid %d.",
+ di->instance_id, start_sample, end_sample,
+ OUTPUT_TYPES[pdo->output_type], output_id);
if (!(pdata = g_try_malloc0(sizeof(struct srd_proto_data))))
return NULL;
@@ -141,8 +143,8 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
next_di = l->data;
/* TODO: is this needed? */
Py_XINCREF(next_di->py_instance);
- srd_spew("srd: sending %d-%d to instance %s",
- start_sample, end_sample, next_di->instance_id);
+ srd_spew("Sending %d-%d to instance %s",
+ start_sample, end_sample, next_di->instance_id);
if (!(py_res = PyObject_CallMethod(next_di->py_instance, "decode",
"KKO", start_sample, end_sample, data))) {
catch_exception("calling %s decode(): ", next_di->instance_id);