apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: Problem with pointer conversion
Date Tue, 08 Jan 2002 02:29:58 GMT
A void pointer is implicitly converted to any other pointer type in C, 
so this cast shouldn't be necessary. Can you be a bit more specific 
about the compiler you're using, the platform, and the error message you 

Christian Gross wrote:

> I was playing around with the HOOK code and noticed a little bug.
> Consider the macro APR_IMPLEMENT_EXTERNAL_HOOK_BASE and find the line
> pHook = apr_array_push( _hooks.link_##name);
> This line causes a compiler fault.  pHook is typedefed, but 
> apr_array_push is a void pointer.  Hence there is compiler problem.  I 
> changed the line to the following
> pHook = (ns##_LINK_##name@@_t *)apr_array_push( _hooks.link_##name);
> Then things worked with no problem.  Basically what was missing was a 
> typecast.
> Could this be added to the APR sources?
> Thanks
> Christian Gross

Brane ─îibej   <brane@xbc.nu>   http://www.xbc.nu/brane/

View raw message