apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: apr/memory/unix apr_pools.c
Date Tue, 22 Oct 2002 04:58:16 GMT
On Tue, Oct 22, 2002 at 02:23:20AM -0000, Ryan Bloom wrote:
> rbb         2002/10/21 19:23:20
> 
>   Modified:    include  apr_errno.h
>                memory/unix apr_pools.c
>   Log:
>   Allow people who use userdata to distinguish between a successful retrieval
>   from the pool userdata, and not being able to retrieve.  We could also
>   separate out when the hash doesn't exist, but I have left that for somebody
>   else.
...
>   -    if (pool->user_data == NULL)
>   +    if (pool->user_data == NULL) {
>            *data = NULL;
>   -    else
>   +    }
>   +    else {
>            *data = apr_hash_get(pool->user_data, key, APR_HASH_KEY_STRING);
>   +    }
>   +
>   +    if (*data == NULL) {
>   +        return APR_KEYNOTFOUND;
>   +    }
>    
>        return APR_SUCCESS;
>    }


Isn't this going to break something? The find_entry() function isn't
able to tell the difference between an unset key and a NULL value,
so why do we pretend to know the difference here? There are a bunch of
places that I see in thread.c, threadpriv.c, and sockets.c that will
start returning errors now where before they didn't, just because
the error != APR_SUCCESS. Am I seeing this correctly?

-aaron

Mime
View raw message