/* Should be a list of [annotation format, [string, ...]]. */
if (!PyList_Check(obj) && !PyTuple_Check(obj)) {
/* Should be a list of [annotation format, [string, ...]]. */
if (!PyList_Check(obj) && !PyTuple_Check(obj)) {
-
- ann_id = PyLong_AsLong(py_tmp);
- if (!(pdo = g_slist_nth_data(di->decoder->annotations, ann_id))) {
+ ann_format = PyLong_AsLong(py_tmp);
+ if (!(pdo = g_slist_nth_data(di->decoder->annotations, ann_format))) {
/* Second element must be a list. */
py_tmp = PyList_GetItem(obj, 1);
/* Second element must be a list. */
py_tmp = PyList_GetItem(obj, 1);
srd_err("Protocol decoder %s submitted annotation list, but "
"second element was malformed.", di->decoder->name);
return SRD_ERR_PYTHON;
}
srd_err("Protocol decoder %s submitted annotation list, but "
"second element was malformed.", di->decoder->name);
return SRD_ERR_PYTHON;
}
/* Annotations are only fed to callbacks. */
if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) {
/* Annotations need converting from PyObject. */
/* Annotations are only fed to callbacks. */
if ((cb = srd_pd_output_callback_find(di->sess, pdo->output_type))) {
/* Annotations need converting from PyObject. */
- if (convert_annotation(di, py_data, &pdata->ann_format,
- (char ***)&pdata->data) != SRD_OK) {
+ if (convert_annotation(di, py_data, pdata) != SRD_OK) {