The address of a PlatformFunction is not looked up until required (for example, when calling it). Looking up the address is referred to as
binding. A
PlatformFunction can also be unbound by the system, meaning that it must be bound again before being called.
Answer a new PlatformFunction with the given parameters. The
callingConvention: must be a string or symbol. The
function: can be a positive
Integer or a
String. The
library: is the name of the shared library where the function is stored. It can be a
String or
nil.
parameterTypes: is an array of type names (
Strings or
Symbols). The
returnType: is a single type name (a
String or
Symbol).
If the library is given as nil, the function must be a
String. The function is looked up in the user primitive table instead of in a shared library. The
String is the name of the user primitive. The function that is called is not a user primitive; it is a normal C function.
Answer a new PlatformFunction with the given parameters. The
callingConvention:,
parameterTypes:, and
returnType: are the same as above. The
address: is a positive
Integer. Use this method to create a
PlatformFunction for a function that is not in a shared library but whose address is available by some other means (for example, returned by an operating system call). A
PlatformFunction created in this manner has its address set to zero when the image starts.