From 42a0bed351979cb4a59c641fa5f03e49609561fd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 30 Mar 2022 16:36:31 +0900 Subject: Prefix ccan headers (#4568) * Prefixed ccan headers * Remove unprefixed names in ccan/build_assert * Remove unprefixed names in ccan/check_type * Remove unprefixed names in ccan/container_of * Remove unprefixed names in ccan/list Co-authored-by: Samuel Williams --- mjit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mjit.c') diff --git a/mjit.c b/mjit.c index 2870b2b304..414088e9e4 100644 --- a/mjit.c +++ b/mjit.c @@ -117,7 +117,7 @@ mjit_update_references(const rb_iseq_t *iseq) // `ISEQ_BODY(iseq)->jit_unit` anymore (because new one replaces that). So we need to check them too. // TODO: we should be able to reduce the number of units checked here. struct rb_mjit_unit *unit = NULL; - list_for_each(&stale_units.head, unit, unode) { + ccan_list_for_each(&stale_units.head, unit, unode) { if (unit->iseq == iseq) { unit->iseq = (rb_iseq_t *)rb_gc_location((VALUE)unit->iseq); } @@ -145,7 +145,7 @@ mjit_free_iseq(const rb_iseq_t *iseq) // `ISEQ_BODY(iseq)->jit_unit` anymore (because new one replaces that). So we need to check them too. // TODO: we should be able to reduce the number of units checked here. struct rb_mjit_unit *unit = NULL; - list_for_each(&stale_units.head, unit, unode) { + ccan_list_for_each(&stale_units.head, unit, unode) { if (unit->iseq == iseq) { unit->iseq = NULL; } @@ -161,8 +161,8 @@ free_list(struct rb_mjit_unit_list *list, bool close_handle_p) { struct rb_mjit_unit *unit = 0, *next; - list_for_each_safe(&list->head, unit, next, unode) { - list_del(&unit->unode); + ccan_list_for_each_safe(&list->head, unit, next, unode) { + ccan_list_del(&unit->unode); if (!close_handle_p) unit->handle = NULL; /* Skip dlclose in free_unit() */ if (list == &stale_units) { // `free_unit(unit)` crashes after GC.compact on `stale_units` @@ -886,7 +886,7 @@ skip_cleaning_object_files(struct rb_mjit_unit_list *list) struct rb_mjit_unit *unit = NULL, *next; // No mutex for list, assuming MJIT worker does not exist yet since it's immediately after fork. - list_for_each_safe(&list->head, unit, next, unode) { + ccan_list_for_each_safe(&list->head, unit, next, unode) { #if defined(_WIN32) // mswin doesn't reach here either. This is for MinGW. if (unit->so_file) unit->so_file = NULL; #endif @@ -930,7 +930,7 @@ mjit_dump_total_calls(void) { struct rb_mjit_unit *unit; fprintf(stderr, "[MJIT_COUNTER] total_calls of active_units:\n"); - list_for_each(&active_units.head, unit, unode) { + ccan_list_for_each(&active_units.head, unit, unode) { const rb_iseq_t *iseq = unit->iseq; fprintf(stderr, "%8ld: %s@%s:%d\n", ISEQ_BODY(iseq)->total_calls, RSTRING_PTR(ISEQ_BODY(iseq)->location.label), RSTRING_PTR(rb_iseq_path(iseq)), FIX2INT(ISEQ_BODY(iseq)->location.first_lineno)); @@ -1036,7 +1036,7 @@ mjit_mark(void) i++; } } - list_for_each(&active_units.head, unit, unode) { + ccan_list_for_each(&active_units.head, unit, unode) { iseqs[i] = unit->iseq; i++; } -- cgit v1.2.3