guile-devel
[Top][All Lists]
Advanced

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

Re: RFC: Foreign objects facility


From: Ludovic Courtès
Subject: Re: RFC: Foreign objects facility
Date: Mon, 28 Apr 2014 10:24:43 +0200
User-agent: Gnus/5.130009 (Ma Gnus v0.9) Emacs/24.3 (gnu/linux)

Hello!

Andy Wingo <address@hidden> 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’.




reply via email to

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