Rename 'state' to 'scope'

This commit is contained in:
2022-11-14 22:49:02 -05:00
parent 706b4a586d
commit af88471b3a
21 changed files with 320 additions and 321 deletions

View File

@@ -9,8 +9,8 @@
#include <limits.h>
#include <stdint.h>
#ifndef UCL_STATE_ARENA_SIZE
#define UCL_STATE_ARENA_SIZE 16
#ifndef UCL_SCOPE_ARENA_SIZE
#define UCL_SCOPE_ARENA_SIZE 16
#endif
#ifndef UCL_OBJECT_ARENA_SIZE
@@ -134,11 +134,11 @@ void ucl_object_mark(struct ucl_object *obj) {
}
}
void ucl_state_mark(struct ucl_arena * arena, void *obj) {
void ucl_scope_mark(struct ucl_arena * arena, void *obj) {
(void) arena;
struct ucl_state *state = (struct ucl_state *) obj;
struct ucl_scope *scope = (struct ucl_scope *) obj;
ucl_object_mark(state->list);
ucl_object_mark(scope->list);
}
void ucl_gc_unmark(struct ucl_arena * arena, void *obj) {
@@ -161,7 +161,7 @@ void ucl_gc_sweep(struct ucl_arena * arena, void *obj) {
void ucl_gc() {
ucl_arena_map(object_arena, ucl_gc_unmark);
ucl_arena_map(state_arena, ucl_state_mark);
ucl_arena_map(scope_arena, ucl_scope_mark);
ucl_arena_map(object_arena, ucl_gc_sweep);
}