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]

Re: Guile-C interfacing and defating garbage collection


Richard Frith-Macdonald <richard@brainstorm.co.uk> writes:

> Obviously, the procedure won't be garbage collected if it is bound to a
> variable name which is not redefined between stages 1 and 3, but is there any
> way to achieve the same effect, without polluting the namespace, under the
> control of the C library code?

Yes:

SCM scm_protect_object (SCM obj)
SCM scm_unprotect_object (SCM obj)
SCM scm_permanent_object (SCM obj)

All three returns obj itself.

/mdj