Next: , Previous: , Up: Alien Operations   [Contents][Index]


8.3.2 Alien Coercion Operations

Macro: alien:addr alien-expr

This macro returns a pointer to the location specified by alien-expr, which must be either an Alien variable, a use of deref, a use of slot, or a use of extern-alien.

Macro: alien:cast alien new-type

This macro converts alien to a new Alien with the specified new-type. Both types must be an Alien pointer, array or function type. Note that the result is not eq to the argument, but does refer to the same data bits.

Macro: alien:sap-alien sap type
Macro: alien:alien-sap alien-value

sap-alien converts sap (a system area pointer see system-area-pointers) to an Alien value with the specified type. type is not evaluated.

alien-sap returns the SAP which points to alien-value’s data.

The type to sap-alien and the type of the alien-value to alien-sap must some Alien pointer, array or record type.


Next: Alien Dynamic Allocation, Previous: Alien Access Operations, Up: Alien Operations   [Contents][Index]