diff --git a/runtime.c b/runtime.c index 94268428..d16992ba 100644 --- a/runtime.c +++ b/runtime.c @@ -75,7 +75,7 @@ void Cyc_check_bounds(void *data, const char *label, int len, int index) { /* END error checking */ /* These macros are hardcoded here to support functions in this module. */ -#define closcall1(td,cfn,a1) if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(td,0, (closure)a1, cfn); } else { ((cfn)->fn)(td,1,cfn,a1);} +#define closcall1(td,cfn,a1) if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(td,0, (closure)(a1), cfn); } else { ((cfn)->fn)(td,1,cfn,a1);} /* Return to continuation after checking for stack overflow. */ #define return_closcall1(td,cfn,a1) \ {char stack; \ @@ -83,7 +83,7 @@ void Cyc_check_bounds(void *data, const char *label, int len, int index) { object buf[1]; buf[0] = a1;\ GC(td,cfn,buf,1); return; \ } else {closcall1(td,(closure) (cfn),a1); return;}} -#define closcall2(td,cfn,a1,a2) if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(td,1, (closure)a1, cfn,a2); } else { ((cfn)->fn)(td,2,cfn,a1,a2);} +#define closcall2(td,cfn,a1,a2) if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(td,1, (closure)(a1), cfn,a2); } else { ((cfn)->fn)(td,2,cfn,a1,a2);} /* Return to continuation after checking for stack overflow. */ #define return_closcall2(td,cfn,a1,a2) \ {char stack; \ diff --git a/scheme/cyclone/cgen.sld b/scheme/cyclone/cgen.sld index 3c8040cd..e9243b52 100644 --- a/scheme/cyclone/cgen.sld +++ b/scheme/cyclone/cgen.sld @@ -151,7 +151,7 @@ (wrap (lambda (s) (if (> num-args 0) s "")))) (string-append "#define closcall" n "(td,cfn" args ") " - (wrap (string-append "if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(td," n-1 ", (closure)a1, cfn" (if (> num-args 1) (substring args 3 (string-length args)) "") "); }")) + (wrap (string-append "if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(td," n-1 ", (closure)(a1), cfn" (if (> num-args 1) (substring args 3 (string-length args)) "") "); }")) (wrap " else { ") "((cfn)->fn)(td," n ",cfn" args ")" (wrap ";}")