| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
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.
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.
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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |