unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: RFC: Foreign objects facility
Date: Mon, 28 Apr 2014 10:24:43 +0200	[thread overview]
Message-ID: <87tx9ddfp0.fsf@gnu.org> (raw)
In-Reply-To: 87bnvm52u6.fsf@pobox.com

Hello!

Andy Wingo <wingo@pobox.com> skribis:

>   7) There is legacy code out there that uses e.g. SCM_SETCDR to set
>      smob fields.  (This is terrible, but it exists:
>      https://github.com/search?q=SCM_SETCDR+smob&ref=cmdform&type=Code
>      for an example.)

[...]

> I propose to provide a new interface that will eventually make SMOBs
> obsolete.  This new interface is based on structs with raw fields -- the
> 'u' fields.  (See
> http://www.gnu.org/software/guile/docs/master/guile.html/Vtables.html#Vtables
> for description of 'u' fields.  Note that the documentation is wrong --
> these fields are indeed traced by the GC.)

I like the idea or basic the new facility on structs.

I would have preferred to rebase SMOBs on top of structs, with the added
documentation as to how they can be accessed from Scheme, but I suppose
this is ruled out by the SCM_SETCDR issue above?

> So, what do people think?  The patch below is against stable-2.0.

The API looks good to me.  The C code could use comments above
functions, but otherwise nothing more than what Mark said about the
patch.

Thanks!

Ludo’.




  parent reply	other threads:[~2014-04-28  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-27 13:17 RFC: Foreign objects facility Andy Wingo
2014-04-27 16:00 ` Mark H Weaver
2014-04-27 16:46   ` Stefan Israelsson Tampe
2014-04-28 17:47     ` Andy Wingo
2014-04-27 17:51   ` Andy Wingo
2014-05-03  4:57     ` Doug Evans
2014-04-28 16:08   ` Andy Wingo
2014-04-29 16:08     ` Doug Evans
2014-04-29 18:27       ` Andy Wingo
2014-04-28  8:24 ` Ludovic Courtès [this message]
2014-04-28 18:05   ` Andy Wingo
2014-04-29 15:56 ` Doug Evans
2014-04-29 18:25   ` Andy Wingo
2014-05-03  5:45     ` Doug Evans

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=87tx9ddfp0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --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).