unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: guile-user@gnu.org
Subject: Re: no scm_foreign_object_p ?
Date: Sat, 23 Jan 2021 12:52:45 -0800	[thread overview]
Message-ID: <79ff69c1-d1f2-393f-d66e-30d850e02553@gmail.com> (raw)
In-Reply-To: <4cb1b5067cb30fbadd34dac26c246bcf47876ade.camel@divoplade.fr>


On 1/23/21 12:04 PM, divoplade wrote:
> Hello,
>
> Le samedi 23 janvier 2021 à 14:29 -0500, olivier.dion--- via General
> Guile related discussions a écrit :
>> On Sat, 23 Jan 2021, Matt Wette <matt.wette@gmail.com> wrote:
>>> I started using foreign objects but want something akin to
>>> number?,
>>> string? etc.
>>> Is there something that works here?
>>> I was hoping to see scm_foreign_object_p(type, object).
>> The only thing I see in the manual is
>> `scm_assert_foreign_object_type`.
> That's what I noticed too; if you want something finer you need to
> write scheme code.
>
> Since foreign pointers are GOOPS objects and foreign pointer types are
> classes, maybe the is-a? predicate could work, with the foreign pointer
> type as the class?
>
> divoplade
>
>

GOOPS should not be part of the solution.  I'm thinking of punting 
foreign-object
and see if using some combination of structs and bytevectors will work 
out better.




      reply	other threads:[~2021-01-23 20:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 18:58 no scm_foreign_object_p ? Matt Wette
2021-01-23 19:29 ` olivier.dion--- via General Guile related discussions
2021-01-23 20:04   ` divoplade
2021-01-23 20:52     ` Matt Wette [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=79ff69c1-d1f2-393f-d66e-30d850e02553@gmail.com \
    --to=matt.wette@gmail.com \
    --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).