From 4c180223a8ae12feb7bc3601e07e848fb9cdb493 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Fri, 28 Dec 2018 11:41:41 +0100 Subject: Add PD tags handling and some tags --- decoder.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'decoder.c') diff --git a/decoder.c b/decoder.c index 2eb9a57..5239818 100644 --- a/decoder.c +++ b/decoder.c @@ -171,6 +171,7 @@ static void decoder_free(struct srd_decoder *dec) g_slist_free_full(dec->outputs, g_free); g_slist_free_full(dec->inputs, g_free); + g_slist_free_full(dec->tags, g_free); g_free(dec->license); g_free(dec->desc); g_free(dec->longname); @@ -802,6 +803,11 @@ SRD_API int srd_decoder_load(const char *module_name) goto err_out; } + if (py_attr_as_strlist(d->py_dec, "tags", &(d->tags)) != SRD_OK) { + fail_txt = "missing or malformed 'tags' attribute"; + goto err_out; + } + /* All options and their default values. */ if (get_options(d) != SRD_OK) { fail_txt = "cannot get options"; -- cgit v1.2.3-70-g09d2