make-foreign-pointer

Function

Package: ff

Arguments: &key address foreign-address type foreign-type size

Creates and returns a foreign-pointer object. These objects are designed to hold integer addresses and in most cases, an integer works as well as a foreign-pointer object. An advantage of foreign-pointer objects is simply that they are different from an integer, allowing for better checking. And because it is an instance of a CLOS class, it can be extended in the normal CLOS way.

foreign-address is the C address that is being pointed to; foreign-type is a user-specifiable type that becomes the value of the foreign-type slot of the foreign-pointer instance being created. size causes allocation of foreign space of that size. Typically, only one of the size and foreign-address keyword argument is specified. size is ignored if foreign-address is specified.

It is an error if both size and foreign-address are unspecified.

See foreign-pointer-address, foreign-pointer-type, and foreign-pointer-p.

See ftype.htm for information on foreign types in Allegro CL and foreign-functions.htm for general information on foreign functions in Allegro CL.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.