This StackOverflow comment regarding libffi / mprotect issues on iPhone seems relevant:

"In the iPhone OS, mprotect() will fail if you try to use it to mark writable sections of memory as executable. This breaks bridges like RubyCocoa (and probably MacRuby) that use libffi to create Objective-C method handlers at runtime. I believe that this is by design because it was not always the case." - Tim Burks

http://stackoverflow.com/questions/219653/ruby-on-iphone

cheers,
  `AA

On Jul 13, 2009, at 12:55 PM, Alex Queiroz wrote:

Hallo,

On 7/13/09, James Long <longster@gmail.com> wrote:

I haven't looked at those FFIs, but I have seen the C API for Obj-C
reflection.  It it too early for me to tell what the best solution
will be for interfacing Obj-C APIs.  I will only be programming
full-screen OpenGL apps, so I don't need complete access to all of the
views, nav bars, lists, etc.  I don't plan on writing a full Obj-C to
Scheme bridge, but maybe that will come eventually.  For that, the
reflection API does look good.


    The ObjC reflection API is very good, but unfortunately Gambit-C
does not support variadic C functions. And they are needed to send
messages to objects. One option is using libffi, other is write
specialised methods in an as-needed basis.

Cheers,
--
-alex
http://www.ventonegro.org/
_______________________________________________
Gambit-iphone mailing list
Gambit-iphone@iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-iphone