[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: on coding a portable R6RS package supporting Guile and its FFI
From: |
Andy Wingo |
Subject: |
Re: on coding a portable R6RS package supporting Guile and its FFI |
Date: |
Tue, 05 Feb 2013 18:38:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
On Thu 17 Jan 2013 11:53, Marco Maggi <address@hidden> writes:
> * Whenever a callout to C accepts a pointer argument: a
> bytevector argument is rejected. Is this not a useless
> complication?
>
> One can work around it by explicitly using
> BYTEVECTOR->POINTER, so everything is ready in Guile. The
> other Scheme implementations using a non-compacting
> garbage collector already support this feature and I find
> it truly convenient.
I agree that we would do well to allow bytevectors wherever an argument
type is a pointer. It avoids an allocation in a very common case
without changing the expressiveness of the interface or adding
significant additional overhead.
Ludovic sounded like he could go either way on this point. Daniel
brought up the argument that "a bytevector is not a pointer"; but for
many purposes it's not a terrible thing to think of it that way. IMHO.
Andy
--
http://wingolog.org/
- Re: on coding a portable R6RS package supporting Guile and its FFI,
Andy Wingo <=