OpenersNotesSection(Spacer1)Details

WSReleaseUTF8Symbol() is declared in the WSTP header file (RefLink[wstp.h, paclet:ref/file/wstp.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "wstp.h"

/* read a UTF-8 encoded symbol from a link and then release the memory to WSTP for deallocation */

void f(WSLINK lp)
{
	const unsigned char *symbol;
	int number_of_bytes;
	int number_of_characters;

	if(! WSGetUTF8Symbol(lp, &symbol, &number_of_bytes, &number_of_characters))
		{ /* unable to read the UTF-8 encoded symbol from lp */ }

	/* ... */

	WSReleaseUTF8Symbol(lp, symbol, number_of_bytes);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[WSGetUTF8Symbol(), paclet:ref/c/WSGetUTF8Symbol])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}, {▪(RefLinkPlain[Handling Lists, Arrays and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Mac OS X), paclet:tutorial/WSTPDeveloperGuide-MacintoshOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Unix and Linux), paclet:tutorial/WSTPDeveloperGuide-UnixOverview])}, {▪(RefLinkPlain[WSTP C API Developer Guide (Windows), paclet:tutorial/WSTPDeveloperGuide-WindowsOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Alphabetical Listing of WSTP C Functions, paclet:guide/AlphabeticalListingOfWSTPCFunctions])}, {▪(RefLinkPlain[WSTP C Functions for Exchanging Symbols, paclet:guide/WSTPCFunctionsForExchangingSymbols])}})}})