scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 01389bee81489f45f6e57e7649032ef4b75e1b19
parent fb86ba15a8c01bb5ba1c726ecc41766211abd259
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 20 Nov 2017 11:47:44 +0000

[lib/scc] Hide struct alloc definition

This definition is not needed to be public. It also
helps to hide the union hdr definition.

Diffstat:
Minc/scc.h | 12------------
Mlib/scc/alloc.c | 8++++++++
2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/inc/scc.h b/inc/scc.h @@ -21,18 +21,6 @@ struct items { typedef struct alloc Alloc; -struct arena; -union hdr; - -struct alloc { - size_t size; - size_t nmemb; - size_t padding; - struct arena *arena; - union hdr *freep; -}; - - extern void die(const char *fmt, ...); extern void dbg(const char *fmt, ...); extern void newitem(struct items *items, char *item); diff --git a/lib/scc/alloc.c b/lib/scc/alloc.c @@ -34,6 +34,14 @@ struct arena { union hdr *array; }; +struct alloc { + size_t size; + size_t nmemb; + size_t padding; + struct arena *arena; + union hdr *freep; +}; + static void newarena(Alloc *allocp) {