MLUTF8LinkName (C 関数)
MLUTF8LinkNameはWSUTF8LinkNameに置き換えられた.
const unsigned char * MLUTF8LinkName(MLINK l, int *n)
l で指定されたMathLink接続の名前を表す,UTF-8のコード形式でコード化された長さ n の文字列を返す.
詳細

- MLUTF8LinkName()は,解放しなければならないリンク名についてメモリを割り当てる.メモリを解放するには,関数によって返される値についてMLReleaseUTF8LinkName()を呼び出す.MLUTF8LinkName()がNULLを返す場合には,NULLの値についてMLReleaseUTF8LinkName()を呼び出してはならない.
- プログラムは,MLUTF8LinkName()で返される文字列の内容を変更してはならない.
- MathLink リンクは,リンクモード,リンクプロトコル,その他のオプションを組み合せたものを使って作成される.リンク名は,リンクを作成するのに使われるリンクモードとリンクプロトコルに必要な情報を提供る.
- MLUTF8LinkName()は,MathLinkヘッダファイルmathlink.hで宣言される.
例題
例 (1)
#include "mathlink.h"
/* A function for reading a link's name */
void f(MLINK l)
{
const unsigned char *name;
int length;
name = MLUTF8LinkName(l, &length);
if(name == (const unsigned char *)0 || length == 0)
{ /* Unable to get the name of the link */ }
/* ... */
MLReleaseUTF8LinkName(l, name, length);
}