[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] Re: [PATCH]: fix warning in the hash module
From: |
Yoann Vandoorselaere |
Subject: |
[bug-gnulib] Re: [PATCH]: fix warning in the hash module |
Date: |
Thu, 19 May 2005 14:01:15 +0200 |
On Thu, 2005-05-19 at 12:46 +0100, Ian Abbott wrote:
> On 19/05/2005 11:18, Yoann Vandoorselaere wrote:
> > On Thu, 2005-05-19 at 10:47 +0100, Ian Abbott wrote:
> >
> >>On 18/05/2005 19:29, Yoann Vandoorselaere wrote:
> >>>It is not. The point was that the interface allow the user to specify a
> >>>callback for freeing the data, and thus the pointer to theses data
> >>>should not be marked as const.
> >>
> >>In that case, I agree with Jim that the current prototype declaration is
> >>correct. The function does not modify the data through the pointer,
> >>hence the thing it is pointing to should be declared const within the
> >>function.
> >
> > This is a matter of opinion. Some people will think that the function
> > should not use const at all since the interface allow the user to
> > specify a callback for freeing the data. Other will not. There is no
> > "correct" answer.
>
> Please re-read Jim's argument about inserting a "const char *" value in
> an earlier sub-thread. At the moment the interface is general enough to
> be used with both const and non-const data without the user of the
> interface having to cast away any const qualifiers.
Yes, I disagree with this argument :-)
--
Yoann Vandoorselaere <address@hidden>
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, (continued)
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Jim Meyering, 2005/05/17
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Yoann Vandoorselaere, 2005/05/17
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Ian Abbott, 2005/05/18
- Re: [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Yoann Vandoorselaere, 2005/05/18
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Ian Abbott, 2005/05/19
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Yoann Vandoorselaere, 2005/05/19
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module, Ian Abbott, 2005/05/19
- [bug-gnulib] Re: [PATCH]: fix warning in the hash module,
Yoann Vandoorselaere <=