guile-devel
[Top][All Lists]
Advanced

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

Re: FFI supports callbacks


From: Ludovic Courtès
Subject: Re: FFI supports callbacks
Date: Fri, 03 Sep 2010 19:27:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello!

Andy Wingo <address@hidden> writes:

> On Fri 03 Sep 2010 07:30, address@hidden (Ludovic Courtès) writes:
>
>> I'm pleased to announce that (system foreign) supports callbacks via the
>> new ‘procedure->pointer’:
>>
>> How do you like it?
>
> Ludovic, that is breathtakingly great. My heart went aflutter looking at
> the f-callback-1 test :-))

That’s the least I could expect.   :-)

> Only two thoughts:
>
>  1) Do we need to trampoline through a scm_with_guile in the callback
>     stub?

Nooo, not necessarily, ‘scm_without_guile’ is old-fashioned.  Quoting
the fine manual:

     Starting from Guile 2.0, blocked threads no longer hinder garbage
  collection.  Thus, the functions below are not needed anymore.  They can
  still be used to inform the GC that a thread is about to block, giving
  it a (small) optimization opportunity for "stop the world" garbage
  collections, should they occur while the thread is blocked.

:-)

>  2) Your commit has some tabs in it ;)

Oh?  But not in Scheme files hopefully?

BTW, while we’re at it, how about make-foreign-function => pointer->procedure?
Sounds like the ultimate rename to me.

Thanks,
Ludo’.




reply via email to

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