cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: issue #33 in TODO-RELEASE

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 7 May 2004 10:21:42 +0200 (CEST)

On Fri, 7 May 2004, Seshubabu Pasam wrote:

> Are you saying you want this to be enabled by default, but have an option to
> turn it off? Or there is no need to have ability to disable this feature?

The penalty of using function pointers for these functions always is very
little so I prefer to have them so, yes.

> It will definitely make the patch much easier, if the standard function
> names can be kept. Yes there is the issue of someone sneaking in code with
> malloc/free etc. I figure there is an interesting way to do this.

That happens most commonly when someone provides a good patch and the
reviewers (like me) miss that there's a function call in there that is used
when it shouldn't be. It has happened many times before, so I like to reduce
that risk.

> But then we will still have to rename some functions (like the free in
> url.c where the memory is allocated by libIDN).

We already have that fixed, as you can see. The memory debug system already
works, and that works by redefining those functions to use other functions.

[calloc]
> I guess that mean one more callback function!

Yes: malloc, calloc, realloc, strdup, free

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-07