GNU bug report logs -
#20907
[PATCH] Manual bug for scm_gc_protect_object
Previous Next
Reported by: Mike Gran <spk121 <at> yahoo.com>
Date: Fri, 26 Jun 2015 23:05:02 UTC
Severity: normal
Tags: patch
Done: Andy Wingo <wingo <at> pobox.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 20907 <at> debbugs.gnu.org (full text, mbox):
Hi Mike,
Mike Gran <spk121 <at> yahoo.com> writes:
> Manual claims C globals weren't scanned by GC in 1.8. The opposite
> is true.
Ludovic wrote that text in 2009, commit
f07c349eb38d6c7b160b8980fc4007fb502e3433.
Ludovic, what do you make of this?
> * doc/ref/api-memory.texi [scm_gc_protect_object]: modified
> ---
> doc/ref/api-memory.texi | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/doc/ref/api-memory.texi b/doc/ref/api-memory.texi
> index 0e37d16..3496cc5 100644
> --- a/doc/ref/api-memory.texi
> +++ b/doc/ref/api-memory.texi
> @@ -42,7 +42,7 @@ as it was protected. It is an error to unprotect an object more times
> than it has been protected. Returns the SCM object it was passed.
>
> Note that storing @var{obj} in a C global variable has the same
> -effect <at> footnote{In Guile up to version 1.8, C global variables were not
> +effect <at> footnote{In Guile up to version 1.8, C global variables were
> scanned by the garbage collector; hence, @code{scm_gc_protect_object}
> was the only way in C to prevent a Scheme object from being freed.}.
If what you say is true, then this patch would not be sufficient,
because the footnote would not make sense. If you're right, then the
entire paragraph above should be removed.
Mark
This bug report was last modified 9 years and 28 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.