1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

* reimplementation of values, call-with-values as primitives:

* values.c, values.h: new files.  use a struct to contain multiple
	values, similar to the previous Scheme-level implementation.
	* Makefile.am: add values.c, values.h, values.x.
	* continuations.c (continuation_apply): support R5RS multiple value
	continuations.
	* init.c: call scm_init_values.
	* struct.h: define SCM_SET_STRUCT_PRINTER.
This commit is contained in:
Gary Houston 2000-11-26 18:27:49 +00:00
parent 5f144b105d
commit ce21243418
7 changed files with 242 additions and 11 deletions

View file

@ -87,6 +87,8 @@ typedef scm_sizet (*scm_struct_free_t) (scm_bits_t * vtable, scm_bits_t * data);
#define SCM_STRUCT_VTABLE(X) (SCM_PACK (SCM_STRUCT_VTABLE_DATA (X) [scm_vtable_index_vtable]))
#define SCM_STRUCT_PRINTER(X) (SCM_PACK (SCM_STRUCT_VTABLE_DATA (X) [scm_vtable_index_printer]))
#define SCM_SET_STRUCT_PRINTER(x, v)\
(SCM_STRUCT_VTABLE_DATA (x) [scm_vtable_index_printer] = (v))
#define SCM_SET_VTABLE_DESTRUCTOR(X, D) (SCM_STRUCT_DATA (X) [scm_struct_i_free] = (scm_bits_t) (D))
/* Efficiency is important in the following macro, since it's used in GC */
#define SCM_LAYOUT_TAILP(X) (((X) & 32) == 0) /* R, W or O */