Minor cleanup and perf improvement
This commit is contained in:
@@ -73,8 +73,6 @@ void *ucl_arena_get(struct ucl_arena *arena) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int total_arena_puts = 0;
|
||||
|
||||
void ucl_arena_put(struct ucl_arena *arena, void *object) {
|
||||
if (object == NULL) {
|
||||
return;
|
||||
@@ -87,9 +85,7 @@ void ucl_arena_put(struct ucl_arena *arena, void *object) {
|
||||
|
||||
assert(offset % arena->object_size == 0);
|
||||
assert(index < arena->capacity);
|
||||
|
||||
assert(arena->used_map[int_index] & (1 << bit_index));
|
||||
total_arena_puts++;
|
||||
|
||||
arena->used_map[int_index] &= ~(1 << bit_index);
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ struct ucl_object *ucl_scope_get(struct ucl *state, struct ucl_scope *scope, con
|
||||
scope = scope->parent;
|
||||
cell = ucl_scope_get_cell(scope, name);
|
||||
}
|
||||
return ucl_list_nth(cell, DATA_POSITION);
|
||||
// This code is a little hot. No error checking.
|
||||
return cell->cell.cdr->cell.car;
|
||||
}
|
||||
|
||||
void ucl_scope_put(struct ucl *state, struct ucl_scope *scope, const char *name, struct ucl_object *obj) {
|
||||
|
||||
Reference in New Issue
Block a user