This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Smob documentation



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]