MLReleaseUCS2LinkName (C 関数)

MLReleaseUCS2LinkNameWSReleaseUCS2LinkNameに置き換えられた.

void MLReleaseUCS2LinkName(MLINK l, const unsigned short *n, int v)

MLUCS2LinkName()によって割り当てられたメモリを解放して,UCS2でコード化された長さ v のリンク名 n を保存する.

詳細

  • リンク名 n を保存するために使われたメモリは,MLUCS2LinkName()への呼出しによって割り当てられたものでなければならない.
  • MLReleaseUCS2LinkName()は,MathLinkヘッダファイルmathlink.hで宣言される.

例題

  (1)

#include "mathlink.h"

/* A function for reading the name of a link */

void f(MLINK l)
{
    const unsigned short *name;
    int length;

    name = MLUCS2LinkName(l, &length);
    if(name == (const unsigned short *)0 || length == 0)
    { /* Unable to retrieve the link name */ }

    /* ... */

    MLReleaseUCS2LinkName(l, name, length);
}