HTStream strangeness???

Hello everybody, 

Why isn't the generic HTStream defined in a header file, but only locally
in HTStream.c?

That way, one always has to define some HTStream compatible structure,
even if one doesn't care what stream it actually is!

The problem is as follows:


#include "HTStream.h"

...

void some_callback(void *me, HTStream *stream)
{
    ...
    /* The following gives a compile-time error */
    stream->isa->put_string(stream, "BlaBla");  
    ...
}

 

The current implementation is totally counter-object-oriented. I can think
of no reason why the current implementation does it the way it does it.

I would vote to change this.

Any comments?

peter

Received on Monday, 4 September 2000 03:21:44 UTC