]> sigrok.org Git - libsigrokdecode.git/blobdiff - type_decoder.c
No need to mess with method reference counts.
[libsigrokdecode.git] / type_decoder.c
index 38fa1ae836d3bc5696327f4695f7507987b936f8..6810d919043bc61337aa0f6b936fa4eefdc34d90 100644 (file)
@@ -78,7 +78,7 @@ static int convert_annotation(struct srd_decoder_inst *di, PyObject *obj,
                        "second element was not a list.", di->decoder->name);
                return SRD_ERR_PYTHON;
        }
-       if (py_strlist_to_char(py_tmp, &ann_text) != SRD_OK) {
+       if (py_strseq_to_char(py_tmp, &ann_text) != SRD_OK) {
                srd_err("Protocol decoder %s submitted annotation list, but "
                        "second element was malformed.", di->decoder->name);
                return SRD_ERR_PYTHON;
@@ -252,8 +252,6 @@ static PyObject *Decoder_put(PyObject *self, PyObject *args)
        case SRD_OUTPUT_PYTHON:
                for (l = di->next_di; l; l = l->next) {
                        next_di = l->data;
-                       /* TODO: Is this needed? */
-                       Py_XINCREF(next_di->py_inst);
                        srd_spew("Sending %d-%d to instance %s",
                                 start_sample, end_sample,
                                 next_di->inst_id);