LispWorks Foreign Language Interface User Guide and Reference Manual

NextPrevTopContentsIndex

3 FLI Pointers

Pointers are a central part of the C type system, and because Lisp does not provide them directly, one of the core features of the FLI is a special pointer type that is used to represent C pointers in Lisp. This chapter discusses how to use FLI pointers by examining some of the functions and macros which allow you to create and manipulate them.

A FLI pointer is a FLI object containing a memory address and a type specification. The implication is that the pointer points to an object of the type specified at the memory address, although a pointer can point to a memory location not containing an allocated FLI object, or an object that was allocated with a different type. Pointers can also point to other pointers, and even to functions.

3.1 Creating and copying pointers

3.2 Pointer testing functions

3.3 Pointer dereferencing and coercing

3.4 An example of dynamic pointer allocation

3.5 More examples of allocation and pointer allocation

3.6 Summary


LispWorks Foreign Language Interface User Guide and Reference Manual - 21 Dec 2009

NextPrevTopContentsIndex