| Allegro CL version 7.0 Moderately revised from 6.2. | |||||||||
Arguments: name-or-ftype
Return the size of an object of the given foreign type (the argument
can be a name of a foreign type or an ftype object). The size only
includes the data bytes and not any overhead bytes needed by
lisp. name-or-ftype can be an actual foreign
object which has a defined type so long as its allocation type is
:foreign or
:foreign-static-gc. The allocation type is defined
when the object is created by, say, allocate-fobject. Objects of allocation type
:lisp have their own lisp types, and thus do not
imply a foreign-type; and objects of :c allocation
are just integers, and thus again do not imply a foreign-type.
cl-user(1): (ff:def-foreign-type point (:struct (x :int) (y :int))) #<foreign-functions::foreign-structure point> cl-user(2): (setq obj (ff:allocate-fobject 'point :foreign-static-gc)) #<foreign object of class point> cl-user(3): (ff:sizeof-fobject 'point) 8 cl-user(4): (ff:sizeof-fobject (ff:get-foreign-type 'point)) 8 cl-user(5): (ff:sizeof-fobject obj) 8 cl-user(6):
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-2006, Franz Inc. Oakland, CA., USA. All rights reserved.
This page has had moderate revisions compared to the 6.2 page.
Created 2005.9.20.
| Allegro CL version 7.0 Moderately revised from 6.2. | |||||||||