alien vocabulary
Factor handbook ยป Vocabulary index


Documentation
C library interface

Metadata
Tags:compiler, ffi
Authors:Slava Pestov


Words

Builtin classes
alien
dll


Tuple classes
ClassSuperclassSlots
callsite-not-compiled tupleword


Singleton classes
cdecl
fastcall
mingw
stdcall
thiscall


Predicate classes
ClassSuperclass
pinned-alien alien


Union classes
abi
c-ptr
pinned-c-ptr


Generic words
WordStack effect
>c-ptr( obj -- c-ptr )
byte-length( obj -- n )
element-size( seq -- n )
expired?( c-ptr -- ? )


Primitives
WordStack effect
<callback>( word return-rewind -- alien )
<displaced-alien>( displacement c-ptr -- alien )
alien-address( c-ptr -- addr )
free-callback( alien -- )


Ordinary words
WordStack effect
<alien>( address -- alien )
<bad-alien>( -- alien )
alien-assembly( args... return parameters abi quot -- return... )
alien-callback( return parameters abi quot -- alien )
alien-indirect( args... funcptr return parameters abi -- return... )
alien-invoke( args... return library function parameters varargs? -- return... )
binary-object( obj -- c-ptr n )
callee-cleanup?( abi -- ? )
callsite-not-compiled( word -- * )
initialize-alien( symbol quot -- )
unregister-and-free-callback( alien -- )
with-callback( alien quot -- )


Class predicate words
WordStack effect
abi?( object -- ? )
alien?( object -- ? )
c-ptr?( object -- ? )
callsite-not-compiled?( object -- ? )
cdecl?( object -- ? )
dll?( object -- ? )
fastcall?( object -- ? )
mingw?( object -- ? )
pinned-alien?( object -- ? )
pinned-c-ptr?( object -- ? )
stdcall?( object -- ? )
thiscall?( object -- ? )


Files


Metadata files


Children from resource:core
VocabularySummary
alien.accessorsSupport reading and writing alien memory.
alien.stringsPassing Factor strings as C strings and vice versa


Children from resource:basis
VocabularySummary
alien.arraysC array support
alien.c-typesC data type support
alien.complexImplementation details for C99 complex float and complex double types
alien.dataWords for allocating objects and arrays of C types
alien.destructorsFunctor for defining destructors which call a C function to dispose of resources
alien.endian
alien.enums
alien.libraries
alien.parserUtilities used in implementation of alien parsing words
alien.prettyprintPrettyprinting aliens and DLLs
alien.remote-controlSupport for embedding Factor in other applications
alien.syntaxC library interface parsing words
alien.utilities


Children from resource:extra
VocabularySummary
alien.cxx
alien.dataWords for allocating objects and arrays of C types
alien.fortranGNU Fortran/G77/F2C alien interface
alien.handlesGenerate integer handle values to allow Factor object references to be passed through the FFI


Children
VocabularySummary
alien.private