apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hyrum K. Wright" <hyrum_wri...@mail.utexas.edu>
Subject Re: [PATCH] apr_hash_this_{key,klen,val}
Date Fri, 12 Mar 2010 16:50:35 GMT

On Mar 12, 2010, at 10:39 AM, William A. Rowe Jr. wrote:

> On 3/12/2010 5:21 AM, Greg Stein wrote:
>> 
>> It is *totally* fine to add a 'const' to a parameter that was not
>> there before. That does not change the ABI whatsoever, and it will not
>> break the API for callers. It merely gives them more information at
>> compile time.
> 
> int oldfunc (const char *result);
> 
> int brokefunc ()
> {
>    char *res = oldfunc();
> }
> 
> doesn't compile on a single platform I know of.
> 
> Your statement makes no sense; how does adding const'ness to char *result
> not come with source code level compatibility breakage?

I think he means it was the 'const' which was not previously present, not the parameter itself.

-Hyrum
Mime
View raw message