cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] typedef void CURL - compiler typechecking

From: Robert Iakobashvili <coroberti_at_gmail.com>
Date: Mon, 19 Mar 2007 16:02:40 +0200

On 3/19/07, Gerrit Bruchhäuser <gbruchhaeuser_at_nero.com> wrote:
> > 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.
>

I our project we already had the cases, where people made soft-links,
copied, etc to get access to internal structures.

-- 
Sincerely,
Robert Iakobashvili,
coroberti %x40 gmail %x2e com
...................................................................
Navigare necesse est, vivere non est necesse
...................................................................
http://curl-loader.sourceforge.net
A powerful open-source HTTP/S, FTP/S traffic
generating, loading and testing tool.
Received on 2007-03-19