FunctionPackage: ffToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

make-foreign-pointer

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

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 arguments is specified. size is ignored if foreign-address is specified.

The aligned argument

If aligned is true and the address or foreign-address keyword was given, then the address is interpreted as an aligned address and is shifted to become a machine integer before storing. (Aligned pointers are described in Aligned Pointers in ftype.htm.)

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

The address and type arguments

address and type are obsolete and should not be used. They are variants of foreign-address and foreign-type. If adress is specified, the value should be as for foreign-type. You should not specify both address and foreign-address.

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.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version