Project

General

Profile

Bug #14834 ยป pc-treatment.diff

kivikakk (Amelia Cuss), 06/08/2018 05:06 AM

View differences:

gc.c
static void
gc_event_hook_body(rb_execution_context_t *ec, rb_objspace_t *objspace, const rb_event_flag_t event, VALUE data)
{
/* increment PC because source line is calculated with PC-1 */
ec->cfp->pc++;
/* increment PC because source line is calculated with PC-1,
* unless we're not an iseq */
bool treat_pc = ec->cfp->pc;
if (treat_pc) {
ec->cfp->pc++;
}
EXEC_EVENT_HOOK(ec, event, ec->cfp->self, 0, 0, 0, data);
ec->cfp->pc--;
if (treat_pc) {
ec->cfp->pc--;
}
}
#define gc_event_hook_available_p(objspace) ((objspace)->flags.has_hook)
    (1-1/1)