[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Killing off scm_init_guile for Guile 2.0 ?

From: Linas Vepstas
Subject: Re: Killing off scm_init_guile for Guile 2.0 ?
Date: Fri, 16 Jan 2009 19:36:33 -0600

2009/1/16  <address@hidden>:
> ---- Neil Jerram <address@hidden> wrote:
>> scm_init_guile has always been a bit problematic, as it requires lots
>> of heuristic and OS-dependent code to try to determine where the base
>> of the stack is.  It's never been formally deprecated, but we have
>> always advised people to use scm_boot_guile or scm_with_guile if they

> Iirc, scm_init_guile is mainly used when you do not have access to main(), 
> for example writing a module for apache.  Generally, when you want to add 
> Guile to an already existing application that has plugins or extension 
> modules via .so's.

This is an excellent example of where scm_init_guile
is exactly the *wrong* function to use. The problem is,
of course, that if you scm_init_guile in some .so,
you will accidentally place the entire system into guile
mode, and not just the .so, as intended.

Instead, you want to call scm_with_guile on entry to
the so, it will unwind on exit.

This could be cleared up by having the docs make
the case more forcefully.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]