* typo in guile doc?
@ 2009-12-26 23:22 Chengqi Song
2009-12-27 11:24 ` Thien-Thi Nguyen
0 siblings, 1 reply; 3+ messages in thread
From: Chengqi Song @ 2009-12-26 23:22 UTC (permalink / raw)
To: guile-user
http://www.gnu.org/software/guile/manual/html_node/Garbage-Collection.html#Garbage-Collection
4th paragraph of "4.3.2 Garbage Collection":
"You do this when writing a SMOB mark function, for example (see Garbage Collecting Smobs). By calling this function, the garbage collector learns about all references that your SMOB has to other SCM values."
what is "has to other SCM values"? is it a typo?
thanks
lars
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: typo in guile doc?
2009-12-26 23:22 typo in guile doc? Chengqi Song
@ 2009-12-27 11:24 ` Thien-Thi Nguyen
2009-12-27 12:52 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: Thien-Thi Nguyen @ 2009-12-27 11:24 UTC (permalink / raw)
To: Chengqi Song; +Cc: guile-user
() Chengqi Song <songcq@gmail.com>
() Sun, 27 Dec 2009 07:22:50 +0800
"By calling this function, the garbage collector learns
about all references that your SMOB has to other SCM values."
what is "has to other SCM values"? is it a typo?
Perhaps that object contains (points to, references) other
sub-objects. The SMOB's mark function must call (back to) Guile's
mark function for those sub-objects. In this way the collector learns.
If the mark function fails to do that, the collector remains ignorant.
thi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: typo in guile doc?
2009-12-27 11:24 ` Thien-Thi Nguyen
@ 2009-12-27 12:52 ` Neil Jerram
0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2009-12-27 12:52 UTC (permalink / raw)
To: Chengqi Song; +Cc: guile-user, Thien-Thi Nguyen
Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> () Chengqi Song <songcq@gmail.com>
> () Sun, 27 Dec 2009 07:22:50 +0800
>
> "By calling this function, the garbage collector learns
> about all references that your SMOB has to other SCM values."
>
> what is "has to other SCM values"? is it a typo?
>
> Perhaps that object contains (points to, references) other
> sub-objects. The SMOB's mark function must call (back to) Guile's
> mark function for those sub-objects. In this way the collector learns.
> If the mark function fails to do that, the collector remains ignorant.
We could rewrite this as:
> "By calling this function, the garbage collector learns
> about the other SCM values (if any) that your SMOB refers to."
Would that be clearer?
Also please note that this is different in Guile 1.9.x. (In summary,
the mark function isn't needed any more.) If you're writing something
new, you may want to consider targeting Guile 1.9.x instead of 1.8.x.
Regards,
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-27 12:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-26 23:22 typo in guile doc? Chengqi Song
2009-12-27 11:24 ` Thien-Thi Nguyen
2009-12-27 12:52 ` Neil Jerram
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).