X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=decode.c;h=026a6133a7956a5344a416b84bbbfab8e9e34efa;hp=a6366b1e190f55cbd43285937a08fa364ae9dc2e;hb=775dda7af58ad9a6bb45ef05634bed59497bb305;hpb=7ea73e33f50211a1b3df6556f6fcfcbab6c36735 diff --git a/decode.c b/decode.c index a6366b1..026a613 100644 --- a/decode.c +++ b/decode.c @@ -18,11 +18,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" #include /* First, so we avoid a _POSIX_C_SOURCE warning. */ #include #include #include -#include /* Re-define some string functions for Python >= 3.0. */ #if PY_VERSION_HEX >= 0x03000000 @@ -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);