The Guile manual warns about "a Common Mistake in Allocating Smobs":

http://www.gnu.org/software/guile/docs/guile-ref/A-Common-Mistake-In-Allocating-Smobs.html#A%20Common%20Mistake%20In%20Allocating%20Smobs

Indeed, it seems to me the Guile 1.6.0 source code contains numerous
instances of this common mistake. For example (in scmsigs.c):

  return scm_list_2(scm_cons(scm_long2num(old_timer.it_interval.tv_sec),
                             scm_long2num(old_timer.it_interval.tv_usec)),
                    scm_cons(scm_long2num(old_timer.it_value.tv_sec),
                             scm_long2num(old_timer.it_value.tv_usec)));

If I understand it correctly, this statement contains several
allocations, each of which can potentially trigger garbage collection
and delete any of the intermediate results.

Have I mistaken? What is the right way of constructing and returning the
list above?


Marko

-- 
Marko Rauhamaa      mailto:[EMAIL PROTECTED]     http://pacujo.net/marko/


_______________________________________________
Bug-guile mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-guile

Reply via email to