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.
Previous WSTP type | C type | |
uchar_ct |
unsigned char
| |
ucharp_ct |
unsigned char *
| |
ucharpp_ct |
unsigned char **
| |
ucharppp_ct |
unsigned char ***
| |
ushort_ct |
unsigned short
| |
ushortp_ct |
unsigned short *
| |
ushortpp_ct |
unsigned short **
| |
ushortppp_ct |
unsigned short ***
| |
uint_ct |
unsigned int
| |
uintp_ct |
unsigned int *
| |
uintpp_ct |
unsigned int **
| |
int_ct |
int
| |
voidp_ct |
void *
| |
voidpp_ct |
void **
| |
charp_ct |
char *
| |
charpp_ct |
char **
| |
charppp_ct |
char ***
| |
long_ct |
long
| |
longp_ct |
long *
| |
longpp_ct |
long **
| |
long_st |
long
| |
longp_st |
long *
| |
longpp_st |
long **
| |
ulong_ct |
unsigned long
| |
ulongp_ct |
unsigned long *
| |
kushortp_ct |
const unsigned short *
| |
kushortpp_ct |
const unsigned short **
| |
kuintp_ct |
const unsigned int *
| |
kuintpp_ct |
const unsigned int **
| |
kucharp_ct |
const unsigned char *
| |
kucharpp_ct |
const unsigned char **
| |
kcharp_ct |
const char *
| |
kcharpp_ct |
const char **
| |
kvoidp_ct |
const void *
|
The memory allocator/deallocator functions passed to the library using 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.
The header file wstp.h now contains several new error definitions related to the Unicode character encoding forms.
Error code | Interpretation | |
WSEPDATABAD | WSTP encountered invalid character data in given character encoding | |
WSEPSCONVERT | unable to convert from given character encoding to WSTP encoding | |
WSEGSCONVERT | unable to convert from WSTP encoding to requested character encoding |
WSPutMessage() and WSGetMessage() now use types int and int * respectively instead of the dev_message and dev_message * types.
WSGetRawData()
|
WSGetData
()
| |
WSGetRawArgCount()
| ||
WSBytesToGet
()
|
WSRawBytesToGet()
| |
WSExpressionsToGet()
|
WSTakeLast()
| |
WSPutRawSize
()
|
WSPutRawData
()
| |
WSPutComposite()
| ||
WSBytesToPut
()
|
WSGetReal() is now an actual API function rather than a #define alias to WSGetDouble(). WSGetReal() still has the same functionality as WSGetDouble().
WSActivate() is now an actual API function rather than a #define alias to WSConnect(). 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.
WSTestHead
()
| ||
WSCheckFunctionWithArg()
|
WSTestHead
()
| |
WSGetInteger
()
| ||
WSGetFloat
()
|
WSGetReal32
()
| |
WSGetDouble
()
|
WSGetReal64
()
| |
WSGetLongDouble()
|
WSGetReal128
()
| |
WSGetShortIntegerArrayData()
|
WSGetInteger16ArrayData()
| |
WSGetIntegerArrayData()
|
WSGetInteger32ArrayData()
| |
WSGetLongIntegerArrayData()
| WSGetInteger64ArrayData() for 64-bit integers or WSGetInteger32ArrayData() for 32-bit integers | |
WSGetFloatArrayData()
|
WSGetReal32ArrayData()
| |
WSGetDoubleArrayData()
|
WSGetReal64ArrayData()
| |
WSGetLongDoubleArrayData()
|
WSGetReal128ArrayData()
| |
WSGetShortIntegerArray()
| ||
WSGetLongIntegerArray()
| ||
WSGetFloatArray()
| ||
WSGetDoubleArray()
| ||
WSGetLongDoubleArray()
| ||
WSDisownShortIntegerArray()
| ||
WSDisownIntegerArray
()
| ||
WSDisownLongIntegerArray()
| ||
WSDisownFloatArray()
| ||
WSDisownDoubleArray()
| ||
WSDisownLongDoubleArray()
| ||
WSDisownIntegerList
()
| ||
WSDisownRealList
()
| ||
WSPutInteger
()
| ||
WSPutFloat
()
|
WSPutReal32
()
| |
WSPutDouble
()
|
WSPutReal64
()
| |
WSPutLongDouble()
|
WSPutReal128
()
| |
WSPutShortIntegerArrayData()
|
WSPutInteger16ArrayData()
| |
WSPutIntegerArrayData()
|
WSPutInteger32ArrayData()
| |
WSPutLongIntegerArrayData()
| WSPutInteger64ArrayData() for 64-bit integers or WSPutInteger32ArrayData() for 32-bit integers | |
WSPutFloatArrayData()
|
WSPutReal32ArrayData()
| |
WSPutDoubleArrayData()
|
WSPutReal64ArrayData()
| |
WSPutLongDoubleArrayData()
|
WSPutReal128ArrayData()
| |
WSPutShortIntegerArray()
| ||
WSPutIntegerArray()
| ||
WSPutLongIntegerArray()
| ||
WSPutFloatArray()
| ||
WSPutDoubleArray()
| ||
WSPutLongDoubleArray()
| ||
WSGetUnicodeSymbol()
| ||
WSPutUnicodeSymbol()
| ||
WSPut16BitCharacters()
|
WSPutUCS2Characters()
| |
WSDisownUnicodeString
()
| ||
WSDisownUnicodeSymbol()
|