Next Previous Up Top Contents Index

5 Function and Macro Reference

define-c-typedef

Macro

Summary

Defines FLI type specifiers corresponding to type specifiers defined using the Ctypedef command.
Package

fli

Signature

define-c-typedef name type-description => name

Arguments

name

The name of the new FLI type.

type-description

A symbol or list defining the new type.

Values

name

The name of the new FLI type.

Description

Thedefine-c-typedef macro is used to define FLI type specifiers, which corresponds to those defined using the C functiontypedef. It is a convenience function, as types can also be defined usingdefine-foreign-type.
Example

In the following example three types are defined using the FLI functiondefine-c-typedef, and the corresponding C definitions are then given.
(fli:define-c-typedef intptr (:pointer :int))
(fli:define-c-typedef bar (:struct (one :int)))

These are the corresponding Ctypedef definitions:
typedef int *intptr;
typedef struct (int one;) bar;

See Also

define-c-enum
define-c-struct
define-c-union
define-foreign-type

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker