diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2011-02-06 17:36:32 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2011-02-06 17:36:32 +0100 |
commit | 75a282e54f566cb6bc9b684dd1bf63d7e36a68b3 (patch) | |
tree | 3ab85fcac2865c6c6d92929f0410aaec40d16d83 /decode.c | |
parent | 4ed59136f8033c2cb745302bfd42d359c541e64b (diff) | |
download | libsigrokdecode-75a282e54f566cb6bc9b684dd1bf63d7e36a68b3.tar.gz libsigrokdecode-75a282e54f566cb6bc9b684dd1bf63d7e36a68b3.zip |
struct srd_decoder: Add more string fields.
Get the following string fields from the .py decoders' register()
function and store them in the respective 'struct srd_decoder':
- longname
- longdesc
- author
- email
- license
Diffstat (limited to 'decode.c')
-rw-r--r-- | decode.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -225,9 +225,26 @@ static int srd_load_decoder(const char *name, if ((r = h_str(py_res, py_func, py_mod, "name", &(d->name))) < 0) return r; + if ((r = h_str(py_res, py_func, py_mod, "longname", + &(d->longname))) < 0) + return r; + if ((r = h_str(py_res, py_func, py_mod, "desc", &(d->desc))) < 0) return r; + if ((r = h_str(py_res, py_func, py_mod, "longdesc", + &(d->longdesc))) < 0) + return r; + + if ((r = h_str(py_res, py_func, py_mod, "author", &(d->author))) < 0) + return r; + + if ((r = h_str(py_res, py_func, py_mod, "email", &(d->email))) < 0) + return r; + + if ((r = h_str(py_res, py_func, py_mod, "license", &(d->license))) < 0) + return r; + d->py_mod = py_mod; Py_XDECREF(py_res); |