Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/parmanoir/libffi-iphone
libffi for the iPhone, including source code for simulator and device
https://github.com/parmanoir/libffi-iphone
Last synced: 18 days ago
JSON representation
libffi for the iPhone, including source code for simulator and device
- Host: GitHub
- URL: https://github.com/parmanoir/libffi-iphone
- Owner: parmanoir
- License: other
- Created: 2009-08-30T04:25:55.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2009-08-30T04:55:14.000Z (about 15 years ago)
- Last Synced: 2024-07-31T22:55:25.836Z (3 months ago)
- Language: C
- Homepage:
- Size: 94.7 KB
- Stars: 58
- Watchers: 7
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
libffi for the iPhone
=**[libffi](http://sourceware.org/libffi/)** allows calling any C-function or ObjC method at runtime.
**libffi-iphone** is a stripped down version of libffi, tailored just for the iPhone. **libffi-iphone** includes source code for both the iPhone simulator and the iPhone itself.
Calling functions
-
Works just like libffi.Creating ffi closures, new functions created and called at runtime
-
ffi closures don't work on the iPhone, asmprotect
is disabled.You can however retarget existing functions if you have a function pool. See [Tim Burks' post about Nu's method pool](http://stackoverflow.com/questions/219653/ruby-on-iphone), see [JSCocoa's Burks Pool](http://github.com/parmanoir/jscocoa/blob/master/JSCocoa/iPhone/BurksPool.m) for another implementation.
To retarget an ObjC pool method, use the method's hidden
_cmd
argument (the current selector) and[self class]
. This will tell you which method of which class is being called.License
-
**libffi-iphone** uses **libffi**'s license.Hey
-
Problems, questions
Patrick Geiller
[[email protected]](mailto:[email protected])