Next Previous Up Top Contents Index

1 The C-FFI Library

1.2 Overview

This section is an overview of the C-FFI library, introducing the most commonly used constructs as the basis for examples.

The C-FFI library provides a set of macros that can be used to describe a C interface in a form that the Functional Developer compiler can understand; we call these macros the C interface definition language.

The C interface definition language provides macros that correspond to each of C's type, function, variable, and constant defining forms. These macros define Dylan classes that designate and encapsulate instances of C types, Dylan methods through which to manipulate C variables and call out to C functions, and functions with C-compatible entry points through which to call in to Dylan from C.

In addition to the interface definition language, the C-FFI library provides run-time methods and functions for allocating, manipulating and destroying instances of C data structures. For example, using these facilities you can allocate C structs and arrays, and access and set their elements.

1.2.1 - C types in Dylan
1.2.2 - C functions in Dylan
1.2.3 - C variables in Dylan

C FFI and Win 32 Reference - 31 MAR 2000

Next Previous Up Top Contents Index