mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-09 22:17:33 +02:00
Allow Cyc-list to handle 0 args
This commit is contained in:
parent
36e590610b
commit
71aaf162c9
3 changed files with 10 additions and 8 deletions
|
@ -202,7 +202,7 @@ object Cyc_number2string2(void *data, object cont, int argc, object n, ...);
|
||||||
object Cyc_symbol2string(void *d, object cont, object sym);
|
object Cyc_symbol2string(void *d, object cont, object sym);
|
||||||
object Cyc_string2symbol(void *d, object str);
|
object Cyc_string2symbol(void *d, object str);
|
||||||
object Cyc_list2string(void *d, object cont, object lst);
|
object Cyc_list2string(void *d, object cont, object lst);
|
||||||
object Cyc_list(void *data, int argc, object cont, object objs_raw, ...);
|
object Cyc_list(void *data, int argc, object cont, ...);
|
||||||
object Cyc_string2number_(void *d, object cont, object str);
|
object Cyc_string2number_(void *d, object cont, object str);
|
||||||
object Cyc_string2number2_(void *data, object cont, int argc, object str, ...);
|
object Cyc_string2number2_(void *data, object cont, int argc, object str, ...);
|
||||||
int binstr2int(const char *str);
|
int binstr2int(const char *str);
|
||||||
|
|
|
@ -1629,11 +1629,11 @@ object Cyc_list2string(void *data, object cont, object lst)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object Cyc_list(void *data, int argc, object cont, object objs_raw, ...)
|
object Cyc_list(void *data, int argc, object cont, ...)
|
||||||
{
|
{
|
||||||
load_varargs(objs, objs_raw, argc - 1);
|
load_varargs(objs, cont, argc);
|
||||||
//Cyc_st_add(data, "scheme/base.sld:list");
|
//Cyc_st_add(data, "Cyc-list");
|
||||||
_return_closcall1(data, cont, objs);
|
_return_closcall1(data, cont, cdr(objs));
|
||||||
}
|
}
|
||||||
|
|
||||||
object Cyc_string2number2_(void *data, object cont, int argc, object str, ...)
|
object Cyc_string2number2_(void *data, object cont, int argc, object str, ...)
|
||||||
|
|
|
@ -1303,9 +1303,11 @@
|
||||||
(list (cps-seq (cddr fn) ;(ast-subx fn)
|
(list (cps-seq (cddr fn) ;(ast-subx fn)
|
||||||
cont-ast)))
|
cont-ast)))
|
||||||
vals)))
|
vals)))
|
||||||
(if (equal? (lambda-formals-type fn) 'args:varargs)
|
(cond
|
||||||
(cons 'Cyc-list code) ;; Manually build up list
|
((equal? (lambda-formals-type fn) 'args:varargs)
|
||||||
code)))))
|
(cons 'Cyc-list code)) ;; Manually build up list
|
||||||
|
(else
|
||||||
|
code))))))
|
||||||
(else
|
(else
|
||||||
(cps-list ast ;(ast-subx ast)
|
(cps-list ast ;(ast-subx ast)
|
||||||
(lambda (args)
|
(lambda (args)
|
||||||
|
|
Loading…
Add table
Reference in a new issue