[gambit-list] is this a bug in ffi?
Marc Feeley
feeley at iro.umontreal.ca
Mon Feb 6 08:08:30 EST 2012
On 2012-02-05, at 1:51 PM, Álvaro Castro-Castilla wrote:
> Hi!
>
> I open a new thread, because this is a deeper issue than the C++ enums conversion problem.
>
> When I declare this:
>
> (define CAIRO_FORMAT_RGB24 ((c-lambda () cairo-format-t "___result = CAIRO_FORMAT_RGB24;")))
>
> or:
> (define CAIRO_FORMAT_RGB24 (c-lambda () cairo-format-t "___result = CAIRO_FORMAT_RGB24;"))
> and then call
> (CAIRO_FORMAT_RGB24)
>
> my program segfaults. It seems that just executing that c-lambda, returning an enum, fails. The enum is defined as: (c-define-type cairo-format-t "cairo_format_t")
>
> I don't understand why this segfaults: 1) I'm declaring the type 2) I'm returning the proper type. What's the problem?
>
>
I can reproduce the problem. It seems to be a bug. I'll look into it today.
Marc
More information about the Gambit-list
mailing list