diff options
Diffstat (limited to 'src/lib/aplwc_internal.h')
| -rw-r--r-- | src/lib/aplwc_internal.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/aplwc_internal.h b/src/lib/aplwc_internal.h index 0a52bb1..d72c289 100644 --- a/src/lib/aplwc_internal.h +++ b/src/lib/aplwc_internal.h @@ -37,7 +37,7 @@ struct aplwc { uint8_t *unaligned_data; size_t size; struct memory_ptr_frame *memptrs; - struct root_ptr *rootptrs; + struct aplwc_ref *refs; unsigned int reachable_bit:1; }; @@ -47,12 +47,6 @@ struct memory_ptr_frame { size_t count; }; -struct root_ptr { - int id; - void *ptr; - struct root_ptr *link; -}; - struct aplwc_line { struct string *text; struct token_list *tokens; @@ -120,13 +114,13 @@ struct token_list *memory_alloc_token_list(struct aplwc *, size_t); struct aplwc_value *memory_alloc_aplwc_value(struct aplwc *); struct aplwc_module *memory_alloc_aplwc_module(struct aplwc *); struct module_imports *memory_alloc_module_imports(struct aplwc *, size_t); -struct aplwc_ref memory_root_new(struct aplwc *, void *); -void *memory_root_get(struct aplwc_ref); -void memory_root_free(struct aplwc_ref); +void memory_root_new(struct aplwc *, void *, struct aplwc_ref *); +void *memory_root_get(struct aplwc_ref *); +void memory_root_free(struct aplwc_ref *); void memptrs_add(struct aplwc *, struct memory_ptr_frame *, void ***, size_t); void memptrs_remove(struct aplwc *, struct memory_ptr_frame *); void clear_ref(struct aplwc_ref *); -int valid_ref(struct aplwc_ref); +int valid_ref(struct aplwc_ref *); #define MEMPTRS(aplwc, n) \ void **memptrs[n]; \ |