Attempting to fix build bustage. Looks like a compiler bug (since |TestObserver| isn't a base class of |nsISupports| in any way, at least the error message has got to be wrong).

This commit is contained in:
scc@netscape.com
1999-12-07 14:46:35 +00:00
parent 6ec9585b85
commit 6bae81e98a

View File

@@ -69,8 +69,12 @@ TestObserver::Observe( nsISupports *aSubject,
const PRUnichar *someData ) {
nsString topic( aTopic );
nsString data( someData );
/*
The annoying double-cast below is to work around an annoying bug in
the compiler currently used on wensleydale. This is a test.
*/
cout << mName << " has observed something: subject@" << (void*)aSubject
<< " name=" << ((TestObserver*)aSubject)->mName
<< " name=" << NS_REINTERPRET(TestObserver*, NS_REINTERPRET_CAST(void*, aSubject))->mName
<< " aTopic=" << topic
<< " someData=" << data << endl;
return NS_OK;