Thanks Jon, that should do the trick. (At least I assume it does,
because I'm sure you've tested it by passing nil.)
By the way, can you typedef those functions pointers. That would make
it look much nicer. I can do it myself, but I'm just making a
suggestion because I don't like seeing messy code.
Along these lines, here's something I've done to allow you to define a
string to nil:
static REALstring REALStringDefineEncoding( REALstring inString,
REALobject newEncoding )
{
static REALstring (*fp)(REALstring, REALobject) = NULL;
if (!fp) {
fp = (REALstring (*)(REALstring,
REALobject))REALLoadGlobalMethod(
nil, "DefineEncoding( s as String, enc as TextEncoding ) as String" );
}
if (fp) {
REALstring out = fp( inString, newEncoding );
REALUnlockString( inString );
return out;
}
return inString;
}
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|