diff --git a/scheme/base.sld b/scheme/base.sld index a0f03fda..bddc239a 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -919,8 +919,8 @@ if (obj_is_int(num)) { return_closcall1(data, k, obj_int2obj( abs( obj_obj2int(num)))); } else if (type_of(num) == integer_tag) { - make_int(i, abs(((integer_type *)num)->value)); - return_closcall1(data, k, &i); + object obj = obj_int2obj(abs(((integer_type *)num)->value)); + return_closcall1(data, k, obj); } else { make_double(d, fabs(((double_type *)num)->value)); return_closcall1(data, k, &d); @@ -946,8 +946,8 @@ j = ((double_type *)num2)->value; } { - make_int(result, i % j); - return_closcall1(data, k, &result); + object result = obj_int2obj(i % j); + return_closcall1(data, k, result); }") ;; From chibi scheme. Cannot use C % operator (define (modulo a b) diff --git a/scheme/time.sld b/scheme/time.sld index d1768662..c48f8af1 100644 --- a/scheme/time.sld +++ b/scheme/time.sld @@ -30,6 +30,7 @@ return_closcall1(data, k, &box); ") (define-c jiffies-per-second "(void *data, int argc, closure _, object k)" - " make_int(box, CLOCKS_PER_SEC); - return_closcall1(data, k, &box); ") + " int n = CLOCKS_PER_SEC; + object obj = obj_int2obj(n); + return_closcall1(data, k, obj); ") ))