]> sigrok.org Git - libsigrokdecode.git/blobdiff - module_sigrokdecode.c
srd: pan1321: Support replies from device.
[libsigrokdecode.git] / module_sigrokdecode.c
index a3872ab53a260d92efa65fdff17e8cb25a44df69..426cf49c28b76c3cb8a0991929cf58c67bb51c43 100644 (file)
@@ -56,7 +56,7 @@ static int convert_pyobj(struct srd_decoder_instance *di, PyObject *obj,
        }
 
        ann_id = PyLong_AsLong(py_tmp);
-       if (!(pdo = g_slist_nth_data(di->decoder->annotation, ann_id))) {
+       if (!(pdo = g_slist_nth_data(di->decoder->annotations, ann_id))) {
                srd_err("Protocol decoder %s submitted data to non-existent annotation format %d",
                                di->decoder->name, ann_id);
                return SRD_ERR_PYTHON;
@@ -230,13 +230,13 @@ PyMODINIT_FUNC PyInit_sigrokdecode(void)
                return NULL;
 
        /* expose output types as symbols in the sigrokdecode module */
-       if(PyModule_AddObject(mod, "SRD_OUTPUT_ANN",
+       if(PyModule_AddObject(mod, "OUTPUT_ANN",
                        PyLong_FromLong(SRD_OUTPUT_ANN)) == -1)
                return NULL;
-       if(PyModule_AddObject(mod, "SRD_OUTPUT_PROTO",
+       if(PyModule_AddObject(mod, "OUTPUT_PROTO",
                        PyLong_FromLong(SRD_OUTPUT_PROTO)) == -1)
                return NULL;
-       if(PyModule_AddObject(mod, "SRD_OUTPUT_BINARY",
+       if(PyModule_AddObject(mod, "OUTPUT_BINARY",
                        PyLong_FromLong(SRD_OUTPUT_BINARY)) == -1)
                return NULL;