From: Gerhard Sittig Date: Sun, 26 Feb 2017 08:16:36 +0000 (+0100) Subject: instance.c: fix a 'matched' vs 'matches' typo X-Git-Tag: libsigrokdecode-0.5.0~78 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e27d3e67cb69d54936399cd97a4c40c9842549a7;p=libsigrokdecode.git instance.c: fix a 'matched' vs 'matches' typo The Decoder_wait() routine will populate the .matched attribute before returning to the caller. The srd_inst_start() routine used to setup a .matches attribute which is unexpected. Make both routines consistently assign to 'matched' as that is what Python decoder implementations are referencing. --- diff --git a/instance.c b/instance.c index 1352975..a1de957 100644 --- a/instance.c +++ b/instance.c @@ -622,8 +622,8 @@ SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di) /* Set self.samplenum to 0. */ PyObject_SetAttrString(di->py_inst, "samplenum", PyLong_FromLong(0)); - /* Set self.matches to None. */ - PyObject_SetAttrString(di->py_inst, "matches", Py_None); + /* Set self.matched to None. */ + PyObject_SetAttrString(di->py_inst, "matched", Py_None); /* Start all the PDs stacked on top of this one. */ for (l = di->next_di; l; l = l->next) {