WSTP header file.
- WSTP C functions are declared in the file wstp.h, which should be included in the source code for any WSTP‐compatible program.
- The following special types are defined in wstp.h:
WSLINK a WSTP link object (analogous to LinkObject in the Wolfram Language) WSMARK a mark in a WSTP stream WSENV WSTP library environment
- The following constants are set up when a WSTP template file is processed:
WSLINK stdlink the standard link that connects a program built from WSTP templates to the Wolfram System WSLINK stdenv the standard WSTP environment in a program built from WSTP templates
- All functions defined in wstp.h are C language functions. They can be called from other languages with appropriate wrappers.
- All functions defined in wstp.h which return int yield a nonzero value if they succeed; otherwise they return 0 and have no effect.
- In a program set up using WSTP templates (.tm files), the link to the Wolfram System is called stdlink.
- All functions defined in wstp.h which put data to a link do not deallocate memory used to store the data. Functions which get data from a link may allocate memory to store the data. Functions which get data from a link will not return until the necessary data becomes available. A yield function can be registered to be called during the wait.
Introduced in 2007