make-foreign-pointer

$Revision: 5.0.2.2 $

Function

Package: FOREIGN-FUNCTIONS

Arguments: (&key foreign-address 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 a different than 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 be 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.htm, foreign-pointer-type.htm, and foreign-pointer-p.htm.

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

The general documentation description is in introduction.htm. The index in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.