chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Question about easyffi


From: felix winkelmann
Subject: Re: [Chicken-users] Question about easyffi
Date: Fri, 3 Aug 2007 08:50:18 +0200

On 8/3/07, Ivan Raikov <address@hidden> wrote:
>
> Hi all,
>
>    If I understand correctly, the easyffi extension translates types
> of the form TYPE * as (pointer TYPE). Is there some way to specify
> custom conversion procedures for a particular TYPE? For example, for
> the following C function:
>
>     PyObject *PyObject_CallObject (PyObject *, PyObject *);
>
> I would like to specify Scheme procedures that take a PyObject
> pointer, and convert that to a Scheme value, and vice versa.
>
>    I want that each time I call PyObject_CallObject from Scheme, its
> arguments are automatically converted to PyObject* values, and when
> the procedure returns, the return value is converted from PyObject* to
> a Scheme value. Is there a simple way to do this?
>

"___declare(type, ...)" should provide what you need (see the easyffi
wiki page - it's somewhat buried in there).


cheers,
felix




reply via email to

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