bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20907: [PATCH] Manual bug for scm_gc_protect_object


From: Mark H Weaver
Subject: bug#20907: [PATCH] Manual bug for scm_gc_protect_object
Date: Tue, 01 Sep 2015 21:59:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Hi Mike,

Mike Gran <address@hidden> 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
> address@hidden Guile up to version 1.8, C global variables were not
> address@hidden 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]