summaryrefslogtreecommitdiff
path: root/libguile/struct.h
diff options
context:
space:
mode:
authorGary Houston <ghouston@arglist.com>2000-11-26 18:27:49 +0000
committerGary Houston <ghouston@arglist.com>2000-11-26 18:27:49 +0000
commitce212434187cb3c800a223508a0c55b8b72cce64 (patch)
tree6ce44511d464078df0f19f946783dfe05240fe17 /libguile/struct.h
parent5f144b105db0dcbe3b33947317d3e9b98cbd5269 (diff)
downloadguile-ce212434187cb3c800a223508a0c55b8b72cce64.tar.gz
* 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.
Diffstat (limited to 'libguile/struct.h')
-rw-r--r--libguile/struct.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/struct.h b/libguile/struct.h
index b78f9a7f9..7c784eb3b 100644
--- a/libguile/struct.h
+++ b/libguile/struct.h
@@ -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 */