WSReleaseUTF32ErrorMessage()
This feature is not supported on the Wolfram Cloud.

void WSReleaseUTF32ErrorMessage(WSLINK l, const unsigned int *m, int n)
releases memory allocated by WSUTF32ErrorMessage() to store the UTF-32 encoded message in m, an array of length n.

DetailsDetails

  • The memory allocated to store the message m must have been allocated by a call to WSUTF32ErrorMessage().
  • WSReleaseUTF32ErrorMessage() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* A function for reading an error message from a link */

void f(WSINK l)
{
    const unsigned int *message;
    int length;

    message = WSUTF32ErrorMessage(l, &length);

    /* We check for length <= 1 here because WSUTF32ErrorMessage
    returns a string with a byte order mark. */

    if(message == (const unsigned int *)0 || length <= 1)
    { /* Unable to get the error message from the link */ }

    /* ... */

    WSReleaseUTF32ErrorMessage(l, message, length);
}
Introduced in 2014
(10.0)