diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-09-28 13:39:24 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-09-28 13:39:24 -0700 |
commit | bc53100f1ef063e09d77e8670e1796bc67017411 (patch) | |
tree | e84b23c3afceb88f75088be2749683b407d1cea2 /include | |
parent | 83cd586ea304d6f6aa190c65ee796baaba1941a7 (diff) |
Checkin: various small changes
Diffstat (limited to 'include')
-rw-r--r-- | include/libbio.h | 6 | ||||
-rw-r--r-- | include/libn.h | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/libbio.h b/include/libbio.h index f84b081..9438b74 100644 --- a/include/libbio.h +++ b/include/libbio.h @@ -18,8 +18,8 @@ typedef struct bio·Tree bio·Node *root; int nleaf; - mem·Allocator heap; - void *h; + mem·Allocator mem; + void *heap; } bio·Tree; /* clade manipulation */ @@ -42,7 +42,7 @@ void *phylo·preorder(bio·Node *clade, void *(*op)(bio·Node*, void*), void *ct void phylo·getleafs(bio·Tree tree, bio·Node **leafs); /* newick i/o */ -error bio·readnewick(io·Peeker stream, void*, bio·Tree* tree); +error bio·readnewick(io·Peeker io, void* rdr, bio·Tree* tree); error bio·writenewick(bio·Tree tree, io·Putter out, void*); // ----------------------------------------------------------------------- diff --git a/include/libn.h b/include/libn.h index 2cf29c7..699786f 100644 --- a/include/libn.h +++ b/include/libn.h @@ -57,6 +57,7 @@ typedef struct mem·Allocator { void *(*alloc)(void *heap, uint n, ulong size); void (*free)(void *heap, void *ptr); } mem·Allocator; + extern mem·Allocator sys·Memory; typedef struct mem·Reallocator { @@ -64,6 +65,7 @@ typedef struct mem·Reallocator { void *(*realloc)(void *iface, void *ptr, uint n, ulong size); void (*free)(void *iface, void *ptr); } mem·Reallocator; + extern mem·Reallocator sys·Relocator; /* simple memory arena */ @@ -73,6 +75,8 @@ mem·Arena *mem·makearena(mem·Allocator from, void*); void *mem·arenaalloc(mem·Arena *A, uint n, ulong size); void mem·freearena(mem·Arena *A); +extern mem·Allocator mem·ArenaAllocator; + /* generalized memxxx functions */ void memset64(void *dst, uint64 val, uintptr size); |