From: Michael D. Lowis Date: Sat, 22 Aug 2015 16:28:09 +0000 (-0400) Subject: Added gc interface functions it internals header X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=e36ac76ed81b0ab8dabd76b56f41e2815e7c2de3;p=proto%2Fgir.git Added gc interface functions it internals header --- diff --git a/source/gc.c b/source/gc.c new file mode 100644 index 0000000..a454742 --- /dev/null +++ b/source/gc.c @@ -0,0 +1,21 @@ +#include "gir_internals.h" + +void gc_init(void** stkbtm) { + (void)stkbtm; +} + +void gc_deinit(void) { +} + +void* gc_alloc(size_t sz) { + (void)sz; + return NULL; +} + +void gc_addref(void* obj) { + (void)obj; +} + +void gc_delfref(void* obj) { + (void)obj; +} diff --git a/source/gir_internals.h b/source/gir_internals.h index 6248ddd..f4cd95b 100644 --- a/source/gir_internals.h +++ b/source/gir_internals.h @@ -10,6 +10,17 @@ #include #include #include +#include +#include + +/****************************************************************************** + * Garbage Collection + *****************************************************************************/ +void gc_init(void** stkbtm); +void gc_deinit(void); +void* gc_alloc(size_t sz); +void gc_addref(void* obj); +void gc_delfref(void* obj); /****************************************************************************** * Singly Linked List diff --git a/source/parser.c b/source/parser.c index afbca1d..1192439 100644 --- a/source/parser.c +++ b/source/parser.c @@ -1,13 +1,7 @@ /** @file parser.c */ -//#include "parser.h" -#include "slist.h" -#include -#include -#include -#include -#include +#include "gir_internals.h" #define UNKNOWN 0 #define SYMBOL 1