apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Gross <christiangr...@yahoo.de>
Subject Problem with pointer conversion
Date Mon, 07 Jan 2002 14:12:12 GMT
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 



Mime
View raw message