NextPrevUpTopContentsIndex

foreign-slot-type

Function
Summary

Returns the type of a specified slot of a foreign object.

Package

fli

Signature

foreign-slot-type object-or-type slot-name => type

Arguments

object-or-type

A foreign object, a pointer to a foreign object, or a foreign structure or union type.

slot-name

A symbol or a list of symbols identifying the slot whose type is to be returned. The value is interpreted as described for foreign-slot-value.

Values

type

The type of slot-name .

Description

The function foreign-slot-type returns the type of a slot of a foreign object.

Example

In the following example two new types, EAST and WEST are defined. Then a new structure, COMPASS , is defined, with two slots. An instance of the structure is created, and foreign-slot-type is used to get the type of the first slot of the structure.

(fli:define-c-typedef EAST (:boolean :int)) (fli:define-c-typedef WEST :long)
(fli:define-c-struct COMPASS
   (x EAST)
   (y WEST))
(fli:foreign-slot-type 'COMPASS 'x) (setq dir (fli:allocate-foreign-object :type 'COMPASS)) (fli:foreign-slot-type dir 'x)
See also

foreign-slot-names
foreign-slot-value


LispWorks Foreign Language Interface User Guide and Reference Manual - 14 Mar 2008

NextPrevUpTopContentsIndex