Aus aktuellem Anlass in den Firefox-Code geschaut
... und mit Grauen abgewendet:
static NS_METHOD
AppendSegmentToString(nsIInputStream *in,
void *closure,
const char *fromRawSegment,
PRUint32 toOffset,
PRUint32 count,
PRUint32 *writeCount)
{
// aFromSegment now contains aCount bytes of data.
nsCAutoString *buf = static_cast<nsCAutoString *>(closure);
buf->Append(fromRawSegment, count);
// Indicate that we have consumed all of aFromSegment
*writeCount = count;
return NS_OK;
}
(aus nsDocShell.cpp:8369)
publiziert Sun, 19 Jul 2009 21:24:14 +0200