Next Previous Up Top Contents Index

5 Function and Macro Reference

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 functionforeign-slot-type returns the type of a slot of a foreign object.
Example

In the following example two new types,EAST andWEST are defined. Then a new structure,COMPASS, is defined, with two slots. An instance of the structure is created, andforeign-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 - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker