Next: Calling Foreign Functions, Up: Foreign Functions [Contents][Index]
In order to provide a convenient way to access the standard C library (libc), FFI comes with a set of predefined types and functions. Of course, you can access other functions and define other types beside the ones in libc. The discussion here is intended to be a basic introduction to FFI. To use a specific library see the more general sections Calling Foreign Functions and User-Defined Types.
| • Predefined FFI data types: | A list of predefined, ready-to-go types provided by FFI. | |
| • The pointer form: | A type modifier to reference data. | |
| • The function form: | A type modifier to reference functions. | |
| • The array form: | A type modifier to specify arrays. | |
| • The union form: | A type modifier to specify unions. | |
| • The struct form: | A type modifier to specify stuctures. | |
| • The c-data form: | A type modifier to specify memory blocks. | |
| • FFI type-related functions: | Functions to gather information on types. |