Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 65268 invoked by uid 500); 7 Jan 2002 14:11:31 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 65255 invoked from network); 7 Jan 2002 14:11:31 -0000 Message-Id: <5.1.0.14.2.20020107151205.03640840@mail.devspace.com> X-Sender: christiangross@pop.mail.yahoo.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 07 Jan 2002 15:12:12 +0100 To: dev@apr.apache.org From: Christian Gross Subject: Problem with pointer conversion Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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