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 get?

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   <[EMAIL PROTECTED]>   http://www.xbc.nu/brane/





Reply via email to