summaryrefslogtreecommitdiff
path: root/decoder.c
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2012-01-09 00:13:03 +0100
committerBert Vermeulen <bert@biot.com>2012-01-09 01:43:37 +0100
commitb231546d63396fd6cac381b12b99caf07687e7e3 (patch)
tree0ba53787c7e5eeb8530c2a2971dcd0fc36f06fa4 /decoder.c
parentf9a3947a7a8d884de6c55693b216f89b1d27d979 (diff)
downloadlibsigrokdecode-b231546d63396fd6cac381b12b99caf07687e7e3.tar.gz
libsigrokdecode-b231546d63396fd6cac381b12b99caf07687e7e3.zip
code cleanup
Diffstat (limited to 'decoder.c')
-rw-r--r--decoder.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/decoder.c b/decoder.c
index f06d5e9..788d2e8 100644
--- a/decoder.c
+++ b/decoder.c
@@ -78,8 +78,6 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec)
int alen, r, i;
char **ann;
- fprintf(stdout, "%s: %s\n", __func__, name);
-
/* "Import" the Python module. */
if (!(py_mod = PyImport_ImportModule(name))) { /* NEWREF */
PyErr_Print(); /* Returns void. */
@@ -92,7 +90,7 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec)
if (PyErr_Occurred())
PyErr_Print(); /* Returns void. */
Py_XDECREF(py_mod);
- fprintf(stderr, "Decoder class not found in PD module %s\n", name);
+ srd_err("Decoder class not found in PD module %s", name);
return SRD_ERR_PYTHON; /* TODO: More specific error? */
}
@@ -117,9 +115,6 @@ int srd_load_decoder(const char *name, struct srd_decoder **dec)
if ((r = h_str(py_res, "author", &(d->author))) < 0)
return r;
- if ((r = h_str(py_res, "email", &(d->email))) < 0)
- return r;
-
if ((r = h_str(py_res, "license", &(d->license))) < 0)
return r;
@@ -168,7 +163,11 @@ int srd_unload_decoder(struct srd_decoder *dec)
{
g_free(dec->id);
g_free(dec->name);
+ g_free(dec->longname);
g_free(dec->desc);
+ g_free(dec->longdesc);
+ g_free(dec->author);
+ g_free(dec->license);
g_free(dec->func);
/* TODO: Free everything in inputformats and outputformats. */