]> sigrok.org Git - libsigrokdecode.git/commitdiff
instance.c: fix a 'matched' vs 'matches' typo
authorGerhard Sittig <redacted>
Sun, 26 Feb 2017 08:16:36 +0000 (09:16 +0100)
committerGerhard Sittig <redacted>
Sun, 26 Feb 2017 09:08:15 +0000 (10:08 +0100)
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.

instance.c

index 1352975b81f7c9ea84347db80f17d8a928c6abcd..a1de9574520d7511211520938c81d73b33dc0df3 100644 (file)
@@ -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) {