MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / srd_call_sub_decoder_end

Function srd_call_sub_decoder_end

libsigrokdecode4DSL/session.c:478–509  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476
477
478SRD_PRIV int srd_call_sub_decoder_end(struct srd_decoder_inst *di, char **error)
479{
480 assert(di && di->next_di);
481
482 GSList *l;
483 struct srd_decoder_inst *sub_dec;
484 PyObject *py_res;
485
486 for (l = di->next_di; l; l = l->next){
487 sub_dec = l->data;
488
489 if (PyObject_HasAttrString(sub_dec->py_inst, "end"))
490 {
491 py_res = PyObject_CallMethod(sub_dec->py_inst, "end", NULL);
492
493 if (!py_res)
494 {
495 srd_exception_catch(error, "Protocol decoder instance %s",
496 sub_dec->inst_id);
497 return SRD_ERR_PYTHON;
498 }
499 }
500
501 //next level decoder
502 if (sub_dec->next_di != NULL){
503 if (srd_call_sub_decoder_end(sub_dec, error) != SRD_OK)
504 return SRD_ERR_PYTHON;
505 }
506 }
507
508 return SRD_OK;
509}
510
511/** @} */

Callers 1

srd_session_endFunction · 0.85

Calls 1

srd_exception_catchFunction · 0.85

Tested by

no test coverage detected