summaryrefslogtreecommitdiff
path: root/libguile/struct.h
diff options
context:
space:
mode:
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 */