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

void WSReleaseUTF8ErrorMessage(WSLINK l, const unsigned char *m, int n)
releases memory allocated by WSUTF8ErrorMessage() to store the UTF-8 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 WSUTF8ErrorMessage().
  • WSReleaseUTF8ErrorMessage() 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 the error message from a link */

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

    message = WSUTF8ErrorMessage(l, &length);
    if(message == (const unsigned char *)0 || length == 0)
    { /* Unable to read the error message from the link */ }

    /* ... */

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