On 7/9/05, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: > > That would be good, because the current fix (which is already > > committed to CVS HEAD, and which removes the setting of the > > procedure-property) still leaves code in modules.c which expects the > > procedure-property to be set. If Han-Wen's fix is to be kept, then > > you should, at least, remove that code. The consequence is that it > > will no longer be possible to lookup the module of the eval closure > > for any kind of closures except the standard ones (which are > > implemented as a smob). > [...] > I guess I'm missing something. Where is the 'module procedure property > set for other eval closures?
It was set in set-module-eval-closure! before this change: 2005-06-10 Han-Wen Nienhuys <[EMAIL PROTECTED]> * boot-9.scm (set-module-eval-closure!): remove set-procedure-property! closure 'module. Setting this property causes un-gc-able modules. It is read by code in modules.c which (still) looks like this: SCM scm_lookup_closure_module (SCM proc) { if (scm_is_false (proc)) return the_root_module (); else if (SCM_EVAL_CLOSURE_P (proc)) return SCM_PACK (SCM_SMOB_DATA (proc)); else { SCM mod = scm_procedure_property (proc, sym_module); <--- HERE if (scm_is_false (mod)) mod = the_root_module (); return mod; } } Eval closures can be any arbitrary procedure which fulfills the obligations of an eval closure. This has been used in the guile-tcltk interface to make Tcl variables and functions look like ordinary Scheme variables. The SMOB eval closures is an optimization for the standard case. M _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel