Next Prev Up Top Contents Index

foreign-slot-type

Function
Summary

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

Package

fli

Signature

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

Arguments

object

A foreign object or a pointer to a foreign object.

slot-name

The slot in object whose type is to be returned.

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))
(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 Dec 2001

Next Prev Up Top Contents Index