lzip-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lzip-bug] Restarting an lzip member at any time


From: Jacob Rief
Subject: Re: [Lzip-bug] Restarting an lzip member at any time
Date: Fri, 11 Dec 2009 22:02:30 +0100

Hello Antonio,
for the API, in the header file I would do a simple forward declaration such as

struct LZ_EncoderImpl;
typedef LZ_EncoderImpl* LZ_Encoder;

struct LZ_DecoderImpl;
typedef LZ_DecoderImpl* LZ_Decoder;


so that the prototypes of your API look like

void LZ_compress_foo(LZ_Encoder encoder, otherargs);
void LZ_decompress_foo(LZ_Decoder decoder, otherargs);

and don't take a pointer onto something (no *), but an opaque and
typesafe handle.

> 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;
> ?

Jacob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]