diff --git a/lib/cont.c b/lib/cont.c index 8e672ec2..545fbf56 100644 --- a/lib/cont.c +++ b/lib/cont.c @@ -112,9 +112,13 @@ pic_values(pic_state *pic, int n, ...) pic_value pic_vvalues(pic_state *pic, int n, va_list ap) { - pic_value *retv = pic_alloca(pic, sizeof(pic_value) * n); + pic_value *retv; int i; + if (n == 1) { + return va_arg(ap, pic_value); + } + retv = pic_alloca(pic, sizeof(pic_value) * n); for (i = 0; i < n; ++i) { retv[i] = va_arg(ap, pic_value); } @@ -129,6 +133,9 @@ pic_cont_values(pic_state *pic) pic_get_args(pic, "*", &argc, &argv); + if (argc == 1) { + return argv[0]; + } return valuesk(pic, argc, argv); } diff --git a/lib/state.c b/lib/state.c index 083a1d42..7534c54c 100644 --- a/lib/state.c +++ b/lib/state.c @@ -279,26 +279,15 @@ pic_close(pic_state *pic) pic_value pic_global_ref(pic_state *pic, pic_value sym) { - pic_value val; - if (! pic_dict_has(pic, pic->globals, sym)) { pic_error(pic, "undefined variable", 1, sym); } - val = pic_dict_ref(pic, pic->globals, sym); - /* FIXME */ - /* if (pic_invalid_p(pic, val)) { */ - /* pic_error(pic, "uninitialized global variable", 1, sym); */ - /* } */ - return val; + return pic_dict_ref(pic, pic->globals, sym); } void pic_global_set(pic_state *pic, pic_value sym, pic_value value) { - /* FIXME */ - /* if (! pic_dict_has(pic, pic->globals, sym)) { */ - /* pic_error(pic, "undefined variable", 1, sym); */ - /* } */ pic_dict_set(pic, pic->globals, sym, value); } diff --git a/piclib/library.scm b/piclib/library.scm index c994971c..6284bfd6 100644 --- a/piclib/library.scm +++ b/piclib/library.scm @@ -221,7 +221,6 @@ cond case else => do when unless parameterize define-record-type)) - (export-keyword 'boolean?) (dictionary-for-each export-keyword (global-objects))) (set! eval (let ((e eval))