bug-gnulib
[Top][All Lists]
Advanced

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

[bug-gnulib] Re: [PATCH]: fix warning in the hash module


From: Ian Abbott
Subject: [bug-gnulib] Re: [PATCH]: fix warning in the hash module
Date: Thu, 19 May 2005 12:46:31 +0100
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

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.

Enough argument on both  side have already been given for that issue.
Jim is the module maintainer and he took the decision to leave the
interface as it is right now, so let's end up this discussion.

Agreed!

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <address@hidden>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-




reply via email to

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