From: Hans Aberg <haberg-1@telia.com>
To: Chris Vine <chris@cvine.freeserve.co.uk>
Cc: guile-user@gnu.org
Subject: Re: How to add Guile support to a package
Date: Mon, 5 Jan 2015 15:44:16 +0100 [thread overview]
Message-ID: <FCFAE615-82F7-4B3A-A403-483362BC5B37@telia.com> (raw)
In-Reply-To: <20150105131811.766a8813@bother.homenet>
> On 5 Jan 2015, at 14:18, Chris Vine <chris@cvine.freeserve.co.uk> wrote:
>
> On Mon, 5 Jan 2015 11:05:31 +0100
> Hans Aberg <haberg-1@telia.com> wrote:
>> There is an issue when using C++ global objects having initializers
>> doing allocations, on platforms (as on OS X) where the GC initializer
>> must run first.
>
> Does this include guile-2.0? That uses the gc library, which seems to
> require some precautions to be taken on Darwin as regards the loading
> of dynamic libraries, but I have not heard of problems interfacing with
> static global objects where those static objects are conventionally
> allocated rather than GC’ed.
Guile is written entirely in C, so there is no problem.
> In any event, I have not had problems getting guile to work as an
> optional extension language for a C++ program with linux, from the
> memory allocation point of view.
On GNU/Linux, GC_INIT() is not required, so there is no issue there.
> There are however issues with
> accommodating guile exceptions, which are basically long jumps, to
> C++ objects with non-trivial destructors. You have to organize the
> code so that no guile exception can take such a C++ object out of
> scope, and no C++ exception can propagate out of a guile dynwind block.
If you want to pass C++ exceptions through C-code, there is a gcc option for that.
next prev parent reply other threads:[~2015-01-05 14:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 9:19 How to add Guile support to a package Antonio Ceballos
2015-01-05 10:05 ` Hans Aberg
2015-01-05 13:18 ` Chris Vine
2015-01-05 14:44 ` Hans Aberg [this message]
2015-01-05 16:27 ` Chris Vine
2015-01-05 17:06 ` Hans Aberg
-- strict thread matches above, loose matches on Subject: below --
2015-01-04 13:47 Antonio Ceballos
2015-01-04 15:03 ` Matt Wette
2015-01-05 9:59 ` John Darrington
2015-01-05 17:08 ` Ludovic Courtès
2015-01-05 17:34 ` Antonio Ceballos
2015-01-05 19:45 ` Ludovic Courtès
2015-01-06 10:26 ` Antonio Ceballos
2015-01-06 20:16 ` Hans Aberg
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=FCFAE615-82F7-4B3A-A403-483362BC5B37@telia.com \
--to=haberg-1@telia.com \
--cc=chris@cvine.freeserve.co.uk \
--cc=guile-user@gnu.org \
/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).