unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Linas Vepstas <linasvepstas@gmail.com>
To: dsmich@roadrunner.com
Cc: Guile User <guile-user@gnu.org>,
	guile-devel <guile-devel@gnu.org>,
	Neil Jerram <neiljerram@googlemail.com>
Subject: Re: Killing off scm_init_guile for Guile 2.0 ?
Date: Fri, 16 Jan 2009 19:36:33 -0600	[thread overview]
Message-ID: <3ae3aa420901161736u5de528d5gc75da062fb036115@mail.gmail.com> (raw)
In-Reply-To: <20090116213215.YITDV.179685.root@cdptpa-web09-z02>

2009/1/16  <dsmich@roadrunner.com>:
> ---- Neil Jerram <neiljerram@googlemail.com> 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.

--linas




  reply	other threads:[~2009-01-17  1:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 23:30 Killing off scm_init_guile for Guile 2.0 ? Neil Jerram
2009-01-15 23:48 ` Neil Jerram
2009-01-16 14:57   ` Ludovic Courtès
2009-01-16  3:59 ` Linas Vepstas
2009-01-16 15:00   ` Ludovic Courtès
2009-01-16 15:41     ` Bill Schottstaedt
2009-01-23  1:49   ` Neil Jerram
2009-01-16 21:32 ` dsmich
2009-01-17  1:36   ` Linas Vepstas [this message]
2009-01-21 21:52     ` Zeeshan Ali (Khattak)
2009-01-23  2:02     ` Neil Jerram
2009-01-23  6:13       ` Clinton Ebadi
2009-01-23 16:23         ` Ludovic Courtès
2009-01-23 16:21       ` Ludovic Courtès
     [not found] <cmu-lmtpd-4567-1232125596-3@mail-imap1.uio.no>
2009-01-16 17:20 ` Kjetil S. Matheussen
2009-01-23  1:44   ` Neil Jerram
2009-01-23  9:12     ` Kjetil S. Matheussen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ae3aa420901161736u5de528d5gc75da062fb036115@mail.gmail.com \
    --to=linasvepstas@gmail.com \
    --cc=dsmich@roadrunner.com \
    --cc=guile-devel@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=neiljerram@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).