WSTP Interface 3

The library now fully supports the Unicode character encoding forms UTF-8, UTF-16, and UTF-32. Use the following new API functions to put or get Unicode characters to or from a link.

The Wolfram Symbolic Transfer Protocol (WSTP) library header file wstp.h no longer contains obsolete platform support sections such as those defined by MACINTOSH_WSTP or OS2_WSTP. MACINTOSH_WSTP definitions referred to Mac OS 9 and earlier. DARWIN_WSTP contains all platform-specific definitions for Mac OS X.

All uses of special alternative names for common C types have been removed from the API. The WSTP header file wstp.h still contains versions of the API functions with these types for use with Interface 2 and older programs.

The memory allocator/deallocator functions passed to the library using (NonWLLink[WSSetAllocParameter, paclet:ref/c/WSSetAllocParameter])() now must be thread-safe.

API functions that previously took a WSParametersPointer type as an argument or returned a WSParametersPointer type now instead take or return a char * type.

API functions that took as an argument or returned a mlapi_result type now take or return type int.

API functions that took as an argument or returned a mlapi_error type now take or return type int.

API functions that took as an argument or returned a mlapi_token type now take or return type int.

API functions that took as an argument or returned a mlapi_packet type now take or return type int.

API functions that took as an argument or returned a WSPointer type now take or return void *.

The WSOpen* functions previously took type long * for the error variable but now take type int *.

The header file wstp.h now contains several new error definitions related to the Unicode character encoding forms.

(NonWLLink[WSPutMessage, paclet:ref/c/WSPutMessage])() and (NonWLLink[WSGetMessage, paclet:ref/c/WSGetMessage])() now use types int and int * respectively instead of the dev_message and dev_message * types.

(NonWLLink[WSSeekMark, paclet:ref/c/WSSeekMark])() and (NonWLLink[WSSeekToMark, paclet:ref/c/WSSeekToMark])() now use type int rather than type long for the expression index.

The functions in the following table took long types for some arguments; they now take int.

(NonWLLink[WSGetReal, paclet:ref/c/WSGetReal])() is now an actual API function rather than a #define alias to (NonWLLink[WSGetDouble, paclet:ref/c/WSGetDouble])(). (NonWLLink[WSGetReal, paclet:ref/c/WSGetReal])() still has the same functionality as (NonWLLink[WSGetDouble, paclet:ref/c/WSGetDouble])().

(NonWLLink[WSActivate, paclet:ref/c/WSActivate])() is now an actual API function rather than a #define alias to WSConnect(). (NonWLLink[WSActivate, paclet:ref/c/WSActivate])() still has the same functionality as WSConnect().

The functions in column one listed below are now obsolete. New programs should use the functions listed in column two for replacement functionality.

Interface 3 changes the default link protocol for link mode Listen and link mode Connect links. By default the WSTP library will create "SharedMemory" links for link mode Listen and link mode Connect links on all platforms.