]> sigrok.org Git - libsigrokdecode.git/blobdiff - type_decoder.c
Prune dead code.
[libsigrokdecode.git] / type_decoder.c
index 6140fd0b21e63112b54259fcb56a6bf3dc618b4e..3e6f17b1e97bf1a13bb052cd03bc54732ef58f36 100644 (file)
@@ -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);
@@ -366,23 +364,9 @@ static PyObject *Decoder_register(PyObject *self, PyObject *args,
        return py_new_output_id;
 }
 
-/* TODO: this is just a stub that calls _register() until all PDs
- * are changed to use the new register API. */
-static PyObject *Decoder_add(PyObject *self, PyObject *args)
-{
-       PyObject *py_keywords, *py_new_output_id;
-
-       py_keywords = PyDict_New();
-       py_new_output_id = Decoder_register(self, args, py_keywords);
-       Py_DecRef(py_keywords);
-
-       return py_new_output_id;
-}
-
 static PyMethodDef Decoder_methods[] = {
        {"put", Decoder_put, METH_VARARGS,
         "Accepts a dictionary with the following keys: startsample, endsample, data"},
-       {"add", Decoder_add, METH_VARARGS, "Create a new output stream"},
        {"register", (PyCFunction)Decoder_register, METH_VARARGS|METH_KEYWORDS,
                        "Register a new output stream"},
        {NULL, NULL, 0, NULL}