klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit df628c2d7effbec7fd278417a9af73b487cd9691
parent 9ef33b000b7370bc31326fb5b889b5ab740ac042
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Tue, 26 Apr 2011 11:44:53 -0300

Bugfix: changed type name for lcm & gcd from number to improper integer.

Diffstat:
Msrc/kgnumbers.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/kgnumbers.c b/src/kgnumbers.c @@ -1017,9 +1017,8 @@ void kgcd(klisp_State *K, TValue *xparams, TValue ptree, TValue denv) UNUSED(xparams); UNUSED(denv); /* cycles are allowed, loop counting pairs */ - int32_t dummy; /* don't care about count of cycle pairs */ - int32_t pairs = check_typed_list(K, "gcd", "number", kimp_intp, true, - ptree, &dummy); + int32_t pairs = check_typed_list(K, "gcd", "improper integer", kimp_intp, + true, ptree, NULL); TValue res = i2tv(0); krooted_vars_push(K, &res); @@ -1056,8 +1055,8 @@ void klcm(klisp_State *K, TValue *xparams, TValue ptree, TValue denv) UNUSED(denv); /* cycles are allowed, loop counting pairs */ int32_t dummy; /* don't care about count of cycle pairs */ - int32_t pairs = check_typed_list(K, "lcm", "number", kimp_intp, true, - ptree, &dummy); + int32_t pairs = check_typed_list(K, "lcm", "improper integer", kimp_intp, + true, ptree, NULL); /* report: this will cover the case of (lcm) = 1 */ TValue res = i2tv(1);