Next: , Up: Alien Variables   [Contents][Index]


8.4.1 Local Alien Variables

Macro: alien:with-alien {(name type {initial-value})}* {form}*

This macro establishes local alien variables with the specified Alien types and names for dynamic extent of the body. The variable names are established as symbol-macros; the bindings have lexical scope, and may be assigned with setq or setf. This form is analogous to defining a local variable in C: additional storage is allocated, and the initial value is copied.

with-alien also establishes a new scope for named structures and unions. Any type specified for a variable may contain name structure or union types with the slots specified. Within the lexical scope of the binding specifiers and body, a locally defined structure type foo can be referenced by its name using:

  (struct foo)