guile-user
[Top][All Lists]
Advanced

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

Re: no scm_foreign_object_p ?


From: Matt Wette
Subject: Re: no scm_foreign_object_p ?
Date: Sat, 23 Jan 2021 12:52:45 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1


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 via email to

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