Re: svn commit: r1917050 - in /apr/apr/trunk: CHANGES crypto/apr_crypto.c dbd/apr_dbd.c dbm/apr_dbm.c include/private/apu_internal.h util-misc/apu_dso.c

Ruediger Pluem <[email protected]>
Newsgroups gmane.comp.apache.apr.devel
Message-ID <[email protected]>

On 4/17/24 9:30 AM, Graham Leggett via dev wrote:
> On 17 Apr 2024, at 08:07, Ruediger Pluem <[email protected]> wrote:
> 
>>> Modified: apr/apr/trunk/util-misc/apu_dso.c
>>> URL: http://svn.apache.org/viewvc/apr/apr/trunk/util-misc/apu_dso.c?rev=1917050&r1=1917049&r2=1917050&view=diff
>>> ==============================================================================
>>> --- apr/apr/trunk/util-misc/apu_dso.c (original)
>>> +++ apr/apr/trunk/util-misc/apu_dso.c Tue Apr 16 21:33:58 2024
>>> @@ -131,7 +131,8 @@ apr_status_t apu_dso_load(apr_dso_handle
>>>                           apr_dso_handle_sym_t *dsoptr,
>>>                           const char *module,
>>>                           const char *modsym,
>>> -                          apr_pool_t *pool)
>>> +                          apr_pool_t *pool,
>>> +                          apu_err_t *err)
>>
>> Now the caller needs to allocate memory even if it is not interested in the error or if there is no error at all.
>> Wouldn't it be better to add an apu_err_t **err instead (which can be NULL) and in case of an error allocate an
>> apu_err_t from pool and fill it and return it in **err (provided it was not NULL).
> 
> I originally used this pattern and found it overkill - what I do now is allocate a app_err_t on the stack and immediately abandon it.

Did you commit this?

Regards

Rüdiger
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.