* Added SCM_SET_CONTINUATION_LENGTH to replace SCM_SETLENGTH.
authorDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Wed, 22 Nov 2000 15:36:58 +0000 (15:36 +0000)
committerDirk Herrmann <dirk@dirk-herrmanns-seiten.de>
Wed, 22 Nov 2000 15:36:58 +0000 (15:36 +0000)
NEWS
libguile/ChangeLog
libguile/continuations.c
libguile/continuations.h

diff --git a/NEWS b/NEWS
index bad32a8..052c165 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -243,7 +243,7 @@ SCM_BITVECTOR_LENGTH, SCM_VECTOR_LENGTH.
 
 Use these instead of SCM_LENGTH.
 
-** New macros:  SCM_SET_VECTOR_LENGTH
+** New macros:  SCM_SET_CONTINUATION_LENGTH, SCM_SET_VECTOR_LENGTH
 
 Use these instead of SCM_SETLENGTH
 
index c0901f5..7beb584 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-22  Dirk Herrmann  <D.Herrmann@tu-bs.de>
+
+       * continuations.c (scm_make_cont):  Use
+       SCM_SET_CONTINUATION_LENGTH instead of SCM_SETLENGTH.
+
+       * continuations.h (SCM_SET_CONTINUATION_LENGTH):  Added.
+
 2000-11-22  Dirk Herrmann  <D.Herrmann@tu-bs.de>
 
        * vectors.c (scm_make_vector), weaks.c (scm_make_weak_vector):
index 2a37800..ca647b1 100644 (file)
@@ -89,7 +89,7 @@ scm_make_cont (SCM *answer)
   SCM_THROW_VALUE (cont) = SCM_EOL;
   src = SCM_BASE (cont) = SCM_BASE (scm_rootcont);
   SCM_SEQ (cont) = SCM_SEQ (scm_rootcont);
-  SCM_SETLENGTH (cont, j, scm_tc7_contin);
+  SCM_SET_CONTINUATION_LENGTH (cont, j);
   SCM_EXIT_A_SECTION;
 #ifndef SCM_STACK_GROWS_UP
   src -= SCM_CONTINUATION_LENGTH (cont);
index 11aa75c..d107f87 100644 (file)
@@ -64,6 +64,7 @@ typedef struct
 #define SCM_CONTREGS(x)                ((scm_contregs *) SCM_CELL_WORD_1 (x))   
 #define SCM_SET_CONTREGS(x, r) (SCM_SET_CELL_WORD_1 ((x), (scm_bits_t) (r))) 
 #define SCM_CONTINUATION_LENGTH(x) (((unsigned long) SCM_CELL_WORD_0 (x)) >> 8)
+#define SCM_SET_CONTINUATION_LENGTH(x, l) (SCM_SET_CELL_WORD_0 ((x), ((l) << 8) + scm_tc7_contin))
 
 #define SCM_JMPBUF(x)          ((SCM_CONTREGS (x))->jmpbuf)
 #define SCM_DYNENV(x)          ((SCM_CONTREGS (x))->dynenv)