apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko Čibej <br...@xbc.nu>
Subject Re: Patch for passing NULL as value argument to apr_env_get
Date Wed, 30 Apr 2008 20:51:07 GMT
Bojan Smojver wrote:
> On Tue, 2008-04-29 at 22:41 -0300, César Leonardo Blum Silveira wrote:
>   
>> I'm really sorry if this is annoying, but no one gave any feedback on
>> this. Hasn't anyone liked the idea? Or maybe I should log this on
>> bugzilla?
>>     
>
> I think this in unlikely to be included, as it changes the usual APR
> behaviour (which is something you noted yourself). Usually, we just let
> things segfault if values passed into the function are not correct.
>
> BTW, you can solve your problem by wrapping APR functions into your own,
> where you do perform the checks and/or define needed variables
> correctly.
>   

This answer isn't really very helpful. He's proposing to make NULL a 
well-defined parameter for this function, not an incorrect one.

On the other hand, I generally object to overloading semantics depending 
on parameter values. In this particular case the proper way would be to 
add a new public function that does just the existence check.

-- Brane


Mime
View raw message