aboutsummaryrefslogtreecommitdiff
path: root/all.h
diff options
context:
space:
mode:
authorQuentin Carbonneaux <[email protected]>2017-01-12 22:31:51 -0500
committerQuentin Carbonneaux <[email protected]>2017-01-12 22:31:51 -0500
commit2b4ece6f99c18df090a127ec20c60ff05cbc0705 (patch)
treee8ef009433b47325520cd6b7f429409cccedce6b /all.h
parente38da51c14d9eaf8c53b58b3d2e33d7b37768f29 (diff)
use a less obtuse api for vnew()
Diffstat (limited to 'all.h')
-rw-r--r--all.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/all.h b/all.h
index d2763eb..7243e09 100644
--- a/all.h
+++ b/all.h
@@ -490,13 +490,14 @@ struct Dat {
/* main.c */
-enum Asm {
- Gasmacho,
- Gaself,
-};
extern char debug['Z'+1];
/* util.c */
+typedef enum {
+ Pheap, /* free() necessary */
+ Pfn, /* discarded after processing the function */
+} Pool;
+
extern Typ typ[NTyp];
extern Ins insb[NIns], *curi;
void die_(char *, char *, ...) __attribute__((noreturn));
@@ -507,7 +508,7 @@ void emit(int, int, Ref, Ref, Ref);
void emiti(Ins);
void idup(Ins **, Ins *, ulong);
Ins *icpy(Ins *, Ins *, ulong);
-void *vnew(ulong, size_t, void *(size_t));
+void *vnew(ulong, size_t, Pool);
void vfree(void *);
void vgrow(void *, ulong);
int clsmerge(short *, short);