X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decoder.c;h=e25e4e01599556e1db3e9b42d64969d47eece5d4;hp=788d2e840c6650639407564f08949717fb01a64d;hb=0db89774dee57db500f270985f73f3bb2dcdbb42;hpb=b231546d63396fd6cac381b12b99caf07687e7e3 diff --git a/decoder.c b/decoder.c index 788d2e8..e25e4e0 100644 --- a/decoder.c +++ b/decoder.c @@ -25,7 +25,6 @@ /* The list of protocol decoders. */ GSList *pd_list = NULL; -GSList *di_list = NULL; /** @@ -128,11 +127,11 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec) d->outputformats = NULL; /* Convert class annotation attribute to GSList of **char */ - d->annotation = NULL; - if (PyObject_HasAttrString(py_res, "annotation")) { - py_annlist = PyObject_GetAttrString(py_res, "annotation"); + d->annotations = NULL; + if (PyObject_HasAttrString(py_res, "annotations")) { + py_annlist = PyObject_GetAttrString(py_res, "annotations"); if (!PyList_Check(py_annlist)) { - srd_err("Protocol decoder module %s annotation should be a list", name); + srd_err("Protocol decoder module %s annotations should be a list", name); return SRD_ERR_PYTHON; } alen = PyList_Size(py_annlist); @@ -146,7 +145,7 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec) if (py_strlist_to_char(py_ann, &ann) != SRD_OK) return SRD_ERR_PYTHON; - d->annotation = g_slist_append(d->annotation, ann); + d->annotations = g_slist_append(d->annotations, ann); } }