The SLclass_set_string_function routine is used to define a
callback function, sfun, that that will be used when a string
representation of an object of the data type represented by cl
is needed. cl must have already been obtained via a call to
SLclass_allocate_class. When called, sfun will be
passed two arguments: a unsigned char which represents the data
type, and the address of the object for which a string represetation
is required. The callback function must return a malloced
string.
Upon success, SLclass_set_string_function returns zero, or
upon error it returns -1.
Example
A callback function that handles both SLANG_STRING_TYPE and
SLANG_INT_TYPE variables looks like: