commit 56382fe1929b822c4584ce02e0196ae209efc2ac
parent 7e70a10a67c7d84591f17055c339bcf1f2990c1c
Author: Andres Navarro <canavarro82@gmail.com>
Date: Sat, 16 Apr 2011 12:59:04 -0300
Checked kghelpers for gc rooting.
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/kghelpers.c b/src/kghelpers.c
@@ -19,11 +19,11 @@
void typep(klisp_State *K, TValue *xparams, TValue ptree, TValue denv)
{
- (void) denv;
/*
** xparams[0]: name symbol
** xparams[1]: type tag (as by i2tv)
*/
+ UNUSED(denv);
int32_t tag = ivalue(xparams[1]);
/* check the ptree is a list while checking the predicate.
@@ -176,7 +176,6 @@ void ftyped_bpredp(klisp_State *K, TValue *xparams, TValue ptree, TValue denv)
kapply_cc(K, b2tv(res));
}
-/* TODO: allow NULL as argument to cpairs and avoid writing it in that case */
/* typed finite list. Structure error should be throw before type errors */
int32_t check_typed_list(klisp_State *K, char *name, char *typename,
bool (*typep)(TValue), bool allow_infp, TValue obj,
diff --git a/src/kghelpers.h b/src/kghelpers.h
@@ -234,7 +234,7 @@ inline bool get_opt_tpar(klisp_State *K, char *name, int32_t type, TValue *par)
*/
inline void unmark_list(klisp_State *K, TValue obj)
{
- (void) K; /* not needed, it's here for consistency */
+ UNUSED(K); /* not needed, it's here for consistency */
while(ttispair(obj) && kis_marked(obj)) {
kunmark(obj);
obj = kcdr(obj);