commit 7e70a10a67c7d84591f17055c339bcf1f2990c1c
parent c111d517602bb5c96356ab8ecc3a4d73b0d5c7c7
Author: Andres Navarro <canavarro82@gmail.com>
Date: Sat, 16 Apr 2011 12:56:33 -0300
Checked kgeqp & kgequalp for gc rooting.
Diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/kgeqp.c b/src/kgeqp.c
@@ -24,11 +24,10 @@
/* NOTE: this does 2 passes but could do it in one */
void eqp(klisp_State *K, TValue *xparams, TValue ptree, TValue denv)
{
- (void) denv;
- (void) xparams;
+ UNUSED(denv);
+ UNUSED(xparams);
- int32_t cpairs;
- int32_t pairs = check_list(K, "eq?", true, ptree, &cpairs);
+ int32_t pairs = check_list(K, "eq?", true, ptree, NULL);
/* In this case we can get away without comparing the
first and last element on a cycle because eq? is
diff --git a/src/kgequalp.c b/src/kgequalp.c
@@ -36,11 +36,10 @@
*/
void equalp(klisp_State *K, TValue *xparams, TValue ptree, TValue denv)
{
- (void) denv;
- (void) xparams;
+ UNUSED(denv);
+ UNUSED(xparams);
- int32_t cpairs;
- int32_t pairs = check_list(K, "equal?", true, ptree, &cpairs);
+ int32_t pairs = check_list(K, "equal?", true, ptree, NULL);
/* In this case we can get away without comparing the
first and last element on a cycle because equal? is
@@ -76,6 +75,8 @@ void equalp(klisp_State *K, TValue *xparams, TValue ptree, TValue denv)
** if the node is not the root, and (#t . n) where n is the number
** of elements in the set, if the node is the root.
** This pair also doubles as the "name" of the set in [2].
+**
+** GC: all of these assume that arguments are rooted.
*/
/* find "name" of the set of this obj, if there isn't one create it,