cleanup
This commit is contained in:
parent
af6a756edd
commit
dfe8e87e65
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
13
lib/state.c
13
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue