MLReleaseUTF8ErrorMessage (C Function)

MLReleaseUTF8ErrorMessage has been replaced by WSReleaseUTF8ErrorMessage.

void MLReleaseUTF8ErrorMessage(MLINK l, const unsigned char *m, int n)

releases memory allocated by MLUTF8ErrorMessage() to store the UTF-8 encoded message in m, an array of length n.

Details

  • The memory allocated to store the message m must have been allocated by a call to MLUTF8ErrorMessage().
  • MLReleaseUTF8ErrorMessage() is declared in the MathLink header file mathlink.h.

Examples

Basic Examples  (1)

#include "mathlink.h"

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

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

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

    /* ... */

    MLReleaseUTF8ErrorMessage(l, message, length);
}