X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=controller.c;h=9f9b7b1820481c8e82e4c5992299b6a8cf370c24;hp=d3bcdcb532a86692107457341b050fa7f649cd8d;hb=19ac1568f74920bd44e43671059cf9e1780e5aca;hpb=ed41649709abc02362df526cbd725775000e8199 diff --git a/controller.c b/controller.c index d3bcdcb..9f9b7b1 100644 --- a/controller.c +++ b/controller.c @@ -1194,29 +1194,4 @@ SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find( return pd_cb; } -/* This is the backend function to Python sigrokdecode.add() call. */ -/** @private */ -SRD_PRIV int srd_inst_pd_output_add(struct srd_decoder_inst *di, - int output_type, const char *proto_id) -{ - struct srd_pd_output *pdo; - - srd_dbg("Instance %s creating new output type %d for %s.", - di->inst_id, output_type, proto_id); - - if (!(pdo = g_try_malloc(sizeof(struct srd_pd_output)))) { - srd_err("Failed to g_malloc() struct srd_pd_output."); - return -1; - } - - /* pdo_id is just a simple index, nothing is deleted from this list anyway. */ - pdo->pdo_id = g_slist_length(di->pd_output); - pdo->output_type = output_type; - pdo->di = di; - pdo->proto_id = g_strdup(proto_id); - di->pd_output = g_slist_append(di->pd_output, pdo); - - return pdo->pdo_id; -} - /** @} */