Hello list,
Jacob Rief wrote:
BTW, is there any special reason why the encoder and decoder are
void*-pointers? I know, behind the scenes these pointers are casted
onto a C++ object, but from type safety considerations I would expect
a pointer onto some kind of type. Why don't you declare a zero sized
C-struct, say struct LZ_Decoder {}; and struct LZ_Encoder {}; and
rewrite the prototypes of the functions to expect a pointer onto these
dummy structs. This would make the code of the lzlib clients a lot
typesafer, so that mixing up a decoder with an encoder is detected
during compile time instead of runtime.
What do you think about this change? Should I use a typedef so that C
programs can declare variables this way:
LZ_Encoder * encoder;
instead of the standard C
struct LZ_Encoder * encoder;
?
Regards,
Antonio.
_______________________________________________
Lzip-bug mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lzip-bug