unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Doug Evans <xdje42@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: Identifying what's usable in installed headers [was Re: RFC: Foreign objects facility]
Date: Mon, 05 May 2014 18:03:26 +0200	[thread overview]
Message-ID: <874n14jjqp.fsf@gnu.org> (raw)
In-Reply-To: <CAP9bCMTwPjW+ykOxJWu5h5o9OGTAvVNXLcnnS_TA4Cm-e02bcQ@mail.gmail.com> (Doug Evans's message of "Fri, 2 May 2014 21:18:04 -0700")

Doug Evans <xdje42@gmail.com> skribis:

> On Fri, May 2, 2014 at 4:19 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Doug Evans <xdje42@gmail.com> skribis:
>>
>>> On Fri, May 2, 2014 at 4:44 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>>>> Doug Evans <xdje42@gmail.com> skribis:
>>>>
>>>>> While function declarations are markable as being internal/external in
>>>>> published headers (SCM_INTERNAL vs SCM_API), macros are not.
>>>>
>>>> Internal macros are marked by a naming convention: they are prefixed by
>>>> ‘SCM_I’.
>>>
>>> Hi.  Sorry, catching up on mail.
>>>
>>> So this means that struct.h:SCM_STRUCT_* are ok to use by apps, right?
>>
>> You got me.  ;-)
>>
>> These ones are not documented, and some of them are clearly too
>> low-level and expose too many implementation details (flags, indexes,
>> etc.)
>>
>> ‘SCM_STRUCTP’, ‘SCM_STRUCT_SLOT_REF’, and a few others may be OK, but
>> there are equivalent public functions anyway, so it’s better to use
>> them.
>
> Thing is, the public functions (scm_struct_ref/set_x) are not
> equivalent (to SCM_STRUCT_SLOT_*).
> Plus the public "slot accessing" functions use the SCM_STRUCT_DATA
> interface. :-)
> SCM_STRUCT_SLOT_* isn't used at all in struct.c.
>
> $ grep SCM_STRUCT_SLOT struct.c | wc
> 0 0 0

Right.  Well, I don’t know what the intent was, and C-x v g tells me we
should ask Andy.  Andy?  :-)

Interestingly, commit b6cf4d02, which added this, also has this bit:

    Remove foreign object implementation.
    
    * libguile/goops.h:
    * libguile/goops.c (scm_make_foreign_object, scm_make_class)
      (scm_add_slot, scm_wrap_object, scm_wrap_component): Remove, these
      were undocumented and unworking.

Ludo’.



      reply	other threads:[~2014-05-05 16:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 16:33 Identifying what's usable in installed headers [was Re: RFC: Foreign objects facility] Doug Evans
2014-04-29 18:33 ` Andy Wingo
2014-05-02 11:44 ` Ludovic Courtès
2014-05-02 18:34   ` Doug Evans
2014-05-02 23:19     ` Ludovic Courtès
2014-05-03  4:18       ` Doug Evans
2014-05-05 16:03         ` Ludovic Courtès [this message]

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=874n14jjqp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=xdje42@gmail.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).