diff options
author | Greg J. Badros <gjb@cs.washington.edu> | 2000-03-09 21:48:25 +0000 |
---|---|---|
committer | Greg J. Badros <gjb@cs.washington.edu> | 2000-03-09 21:48:25 +0000 |
commit | 41b0806d3ed1c6e11fcae8e09b161f320137a73b (patch) | |
tree | 0f3438113efe9db300637708cfb679657c3ce836 /libguile/gc.c | |
parent | 7ac030d6de0e8fad668851f5c42f9869cc2b1b3f (diff) | |
download | guile-41b0806d3ed1c6e11fcae8e09b161f320137a73b.tar.gz |
* vectors.h (SCM_VELTS_AS_STACKITEMS): Added this macro to help in
eliminating some warnings.
* unif.c, strports.c, print.c, options.c: Fix some warnings on
mis-use of SCM/long
* gc.c, gc.h: Added scm_return_first_int(), and added comment re:
what the scm_return_first* functions do.
Diffstat (limited to 'libguile/gc.c')
-rw-r--r-- | libguile/gc.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libguile/gc.c b/libguile/gc.c index 5d3fc5bd9..38f8bc6d0 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -755,7 +755,7 @@ gc_mark_nimp: (ptr) break; SCM_SETGC8MARK (ptr); if (SCM_VELTS (ptr)) - scm_mark_locations (SCM_VELTS (ptr), + scm_mark_locations (SCM_VELTS_AS_STACKITEMS (ptr), (scm_sizet) (SCM_LENGTH (ptr) + (sizeof (SCM_STACKITEM) + -1 + @@ -1809,14 +1809,25 @@ scm_remember (SCM *ptr) /* - What the heck is this? --hwn - */ + These crazy functions prevent garbage collection + of arguments after the first argument by + ensuring they remain live throughout the + function because they are used in the last + line of the code block. + It'd be better to have a nice compiler hint to + aid the conservative stack-scanning GC. --03/09/00 gjb */ SCM scm_return_first (SCM elt, ...) { return elt; } +int +scm_return_first_int (int i, ...) +{ + return i; +} + SCM scm_permanent_object (SCM obj) |