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);
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);
}
}
options = {
'address-space': ['Address space (in bits)', 7],
}
- annotation = [
+ annotations = [
# ANN_SHIFTED
["7-bit shifted hex",
"Read/Write bit shifted out from the 8-bit i2c slave address"],
}
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;