From: "Hans Åberg" <haberg-1@telia.com>
To: Greg Troxel <gdt@lexort.com>
Cc: Isaac Jurado <diptongo@gmail.com>, guile-devel@gnu.org
Subject: Re: C calling Scheme and garbage collection
Date: Sun, 30 Jun 2019 14:51:52 +0200 [thread overview]
Message-ID: <A8C7B463-2C3E-4AED-A1B9-651F5B6B5C83@telia.com> (raw)
In-Reply-To: <rmia7e2yfev.fsf@s1.lexort.com>
> On 27 Jun 2019, at 21:52, Greg Troxel <gdt@lexort.com> wrote:
>
> I have been down this path before, with guile and with lua. Basically,
> if C (or non-scheme) has a pointer to a scheme object, then you need to
> hold a logical reference for it and protect the scheme object, and when
> the C pointer is dropped decrease the refcnt.
>
> I am unclear on the details of how you have a ref that gc is made aware
> of.
If one allocates with the underlying Boehm GC, is the SCM object kept alive?
next prev parent reply other threads:[~2019-06-30 12:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 16:38 C calling Scheme and garbage collection Isaac Jurado
2019-06-27 19:52 ` Greg Troxel
2019-06-28 11:07 ` Isaac Jurado
2019-06-29 17:44 ` Greg Troxel
2019-06-30 12:17 ` David Pirotte
2019-06-30 20:05 ` Isaac Jurado
2019-06-30 12:51 ` Hans Åberg [this message]
2019-07-01 1:26 ` Mark H Weaver
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=A8C7B463-2C3E-4AED-A1B9-651F5B6B5C83@telia.com \
--to=haberg-1@telia.com \
--cc=diptongo@gmail.com \
--cc=gdt@lexort.com \
--cc=guile-devel@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).