This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Smob documentation
- To: guile@cygnus.com
- Subject: Smob documentation
- From: Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE>
- Date: Tue, 15 Jun 1999 16:19:32 GMT
Hi,
could someone please add a section to data-rep.texi
that describes how and why it is neccesary to inhibit
garbage collection while creating a smob. It took
me one hour to find the following bug:
[...]
scm_block_gc = 1; /* prevent memoized from being gc'ed */
{
eval_environment->memoized =
scm_make_doubly_weak_hash_table((SCM) SCM_MAKINUM (scm_symhash_dim));
eval_environment_smob = scm_make_environment(eval_environment);
}
scm_block_gc = 0;
return eval_environment_smob;
[...]
Jost