summaryrefslogtreecommitdiff
path: root/libguile/print.h
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>1996-10-15 03:40:21 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>1996-10-15 03:40:21 +0000
commitbf685b6d20c6cf9e7e49ecc09ab8dbb005a5e4e9 (patch)
treec327b9fa495a10a4af0d462dc0075133300987c7 /libguile/print.h
parent2a786759c1e151443cb794ef105183db40f0dd89 (diff)
downloadguile-bf685b6d20c6cf9e7e49ecc09ab8dbb005a5e4e9.tar.gz
* print.c (make_print_state, grow_print_state), print.h: Modified
the print state representation: Don't use a tail array for recording of circular references. Resizing of the print state structure invalidates the print state pointer. To avoid passing around an indirect print state reference to all printing functions, we instead let the print state reference a resizable vector.
Diffstat (limited to 'libguile/print.h')
-rw-r--r--libguile/print.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/print.h b/libguile/print.h
index 483d31386..cb326fb5b 100644
--- a/libguile/print.h
+++ b/libguile/print.h
@@ -67,7 +67,7 @@ extern scm_option scm_print_opts[];
#define SCM_WRITINGP(pstate) ((pstate)->writingp)
#define SCM_SET_WRITINGP(pstate, x) { (pstate)->writingp = (x); }
-#define SCM_PRINT_STATE_LAYOUT "sruwuwuwuwpwuwuwurpW"
+#define SCM_PRINT_STATE_LAYOUT "sruwuwuwuwpwuwuwuruopr"
typedef struct scm_print_state {
SCM handle; /* Struct handle */
unsigned long writingp; /* Writing? */
@@ -78,9 +78,9 @@ typedef struct scm_print_state {
unsigned long list_offset;
unsigned long top; /* Top of reference stack */
unsigned long ceiling; /* Max size of reference stack */
- unsigned long n_refs; /* Size of struct tail array */
- SCM ref_stack[1]; /* Stack of references used during
+ SCM *ref_stack; /* Stack of references used during
circular reference detection */
+ SCM ref_vect;
} scm_print_state;
extern SCM scm_print_options SCM_P ((SCM setting));