aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-30 11:54:19 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-30 11:54:19 -0700
commit9e83bf8c3656b736ba3a14d9b7b8af61b48415f4 (patch)
tree4417ac3eafdd744d7a944a6da6bf630844ef5f90 /include
parent86134ccf82dcafe338e68c14e483ec98cfc94925 (diff)
chore: move from new to make prefix of constructors
Diffstat (limited to 'include')
-rw-r--r--include/libn.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/libn.h b/include/libn.h
index aa9aef7..063a408 100644
--- a/include/libn.h
+++ b/include/libn.h
@@ -86,7 +86,7 @@ mem·Allocator mem·sys = {
/* simple memory arena */
typedef struct mem·Arena mem·Arena;
-mem·Arena *mem·newarena(mem·Allocator from, void*);
+mem·Arena *mem·makearena(mem·Allocator from, void*);
void *mem·arenaalloc(mem·Arena *A, uint n, ulong size);
void mem·freearena(mem·Arena *A);
@@ -98,7 +98,7 @@ void memset64(void *dst, uint64 val, uintptr size);
typedef struct Coro Coro;
-Coro* coro·new(uintptr stk, uintptr (*func)(Coro*, uintptr));
+Coro* coro·make(uintptr stk, uintptr (*func)(Coro*, uintptr));
uintptr coro·yield(Coro *c, uintptr arg);
error coro·free(Coro *c);
@@ -144,10 +144,10 @@ int utf8·isspace(Rune r);
int utf8·istitle(Rune r);
/* string helpers */
-string str·newcap(const byte *s, vlong len, vlong cap);
-string str·newlen(const byte *s, vlong len);
-string str·new(const byte *s);
-string str·newf(const byte *fmt, ...);
+string str·makecap(const byte *s, vlong len, vlong cap);
+string str·makelen(const byte *s, vlong len);
+string str·make(const byte *s);
+string str·makef(const byte *fmt, ...);
void str·free(string s);
int str·len(const string s);
int str·cap(const string s);
@@ -259,13 +259,13 @@ error mmap·close(mmap·Reader rdr);
typedef struct flate·Reader flate·Reader;
typedef struct flate·Writer flate·Writer;
-flate·Reader *flate·newreader(io·Reader rdr, void* r, mem·Allocator mem, void* m);
+flate·Reader *flate·openreader(io·Reader rdr, void* r, mem·Allocator mem, void* m);
int flate·read(flate·Reader *rdr, int sz, int n, void *buf);
-error flate·freereader(flate·Reader *rdr);
+error flate·closereader(flate·Reader *rdr);
-flate·Writer *flate·newwriter(io·Writer wtr, void* w, mem·Allocator mem, void* m);
-error flate·freewriter(flate·Writer *wtr);
+flate·Writer *flate·openwriter(io·Writer wtr, void* w, mem·Allocator mem, void* m);
int flate·write(flate·Writer *wtr, int sz, int n, void *buf);
+error flate·closewriter(flate·Writer *wtr);
// -----------------------------------------------------------------------------
// libgz