The following Factor objects may be passed to C function parameters with pointer types:
• Instances of alien . • Instances of f ; this is interpreted as a null pointer. • Instances of byte-array ; the C function receives a pointer to the first element of the array. • Any data type which defines a method on >c-ptr . This includes Struct classes and Specialized arrays .
The class of primitive C pointer types:
c-ptr
A generic word for converting any object to a C pointer; user-defined types may add methods to this generic word:
>c-ptr ( obj -- c-ptr )
More about the
alien type:
Alien addresses Warning The Factor garbage collector can move byte arrays around, and code passing byte arrays, or objects backed by byte arrays, must obey important guidelines. See
Byte arrays and the garbage collector .
This documentation was generated offline from a
load-all
image. If you want, you can also
browse the documentation from within the UI developer tools . See
the Factor website
for more information.
Factor 0.101 x86.64 (2285, heads/master-efda6dad2f, Nov 20 2024 16:02:37)