curl-library
Re: [PATCH] typedef void CURL - compiler typechecking
Date: Mon, 19 Mar 2007 14:04:12 +0100
> On 3/19/07, Daniel Stenberg <daniel_at_haxx.se> wrote:
> > On Mon, 19 Mar 2007, Gerrit Bruchhäuser wrote:
> >
> > The patch is incorrect:
> > > +typedef struct Curl_multi* CURLM;
> >
> > Neither of the typedefs should be pointers, they should be structs as
> > they were previously 'void' and not 'void *'.
> >
> > This minor mistake aside, is there anyone who believes this could
> > possibly break the ABI if introduced now?
>
> It may open a way for some bloody hacking with castings, etc instead
> of working via API.
> Just recently I have used curl as an example of real encapsulation
> and good style of C-programming.
The struct is still undefined, as if it was still a void pointer. The only
difference is that compiler can print a warning if a multi_handle is passed
as an easy_handle somewhere.
Received on 2007-03-19