Alien addresses
Factor documentation > Factor handbook > C library interface > Passing data between Factor and C > Passing pointers to C functions
Prev:>c-ptr ( obj -- c-ptr )


Instances of the alien class represent pointers to C data outside the Factor heap:
<alien> ( address -- alien )

<displaced-alien> ( displacement c-ptr -- alien )

alien-address ( c-ptr -- addr )


Anywhere that a alien instance is accepted, the f singleton may be passed in to denote a null pointer.

Usually alien objects do not have to created and dereferenced directly; instead declaring C function parameters and return values as having a pointer type such as void* takes care of the details.
Alien object literal syntax
Alien expiry

When higher-level abstractions won't do:
Reading and writing memory directly

See also
Passing data between Factor and C, C type specifiers