Next Previous Up Top Contents Index

5 Function and Macro Reference

pointer-element-type

Function

Summary

Returns the type of the foreign object pointed to by an FLI pointer.
Package

fli

Signature

pointer-element-type pointer => type

Arguments

pointer

An FLI pointer to a foreign object.

Values

type

The type of the object pointed to by pointer.

Description

The functionpointer-element-type returns the type of the foreign object pointed to by pointer.
Example

In the following example a pointer to an integer is defined, andpointer-element-type is used to confirm that the pointer points to an integer.
(setq point (fli:allocate-foreign-object :type :int))

(fli:pointer-element-type point)

In the next example a new type,HAPPY, is defined. The pointerpoint is set to point to an instance ofHAPPY, andpointer-element-type is used to find the type of the object pointed to bypoint.
(fli:define-c-typedef HAPPY :long)

(setq point (fli:allocate-foreign-object :type 'HAPPY))

(fli:pointer-element-type point)

See Also

foreign-slot-type
pointer-element-size

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker