On 4/17/24 9:30 AM, Graham Leggett via dev wrote:
> On 17 Apr 2024, at 08:07, Ruediger Pluem <rpl...@apache.org> 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

Reply via email to