W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

HTStream strangeness???

From: Peter Stamfest <peter.stamfest@eunet.at>
Date: Mon, 4 Sep 2000 09:19:41 +0200 (CEST)
To: www-lib@w3.org
Message-ID: <Pine.LNX.4.21.0009040821590.8066-100000@peter.stamf.pr.at>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:38 GMT