struct jtag_tap_event_action
{
- enum jtag_event event;
- Jim_Obj* body;
- struct jtag_tap_event_action* next;
+ /// The event for which this action will be triggered.
+ enum jtag_event event;
+ /// The interpreter to use for evaluating the @c body.
+ Jim_Interp *interp;
+ /// Contains a script to 'eval' when the @c event is triggered.
+ Jim_Obj *body;
+ // next action in linked list
+ struct jtag_tap_event_action *next;
};
/**
if (!found)
jteap = calloc(1, sizeof(*jteap));
else if (NULL != jteap->body)
- Jim_DecrRefCount(interp, jteap->body);
+ Jim_DecrRefCount(goi->interp, jteap->body);
+ jteap->interp = goi->interp;
jteap->event = n->value;
Jim_Obj *o;
}
else if (found)
{
+ jteap->interp = goi->interp;
Jim_SetResult(goi->interp,
Jim_DuplicateObj(goi->interp, jteap->body));
}
tap->dotted_name, e, nvp->name,
Jim_GetString(jteap->body, NULL));
- if (Jim_EvalObj(interp, jteap->body) != JIM_OK)
+ if (Jim_EvalObj(jteap->interp, jteap->body) != JIM_OK)
{
- Jim_PrintErrorMessage(interp);
+ Jim_PrintErrorMessage(jteap->interp);
continue;
}