pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Patch for FS#56 (second try)


From: jemarch
Subject: Re: [pdf-devel] Patch for FS#56 (second try)
Date: Thu, 24 Jul 2008 13:31:23 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

   Now I added two wrapper functions over pdf_dealloc() and the compiler issues 
a
   warning concerning a non-const pointer. I mean, the function pointer type is,
   ##
   typedef void (*pdf_hash_element_dispose_fn_t) (const void *elt);
   ###

   While pdf_dealloc is,
   ##
   void pdf_dealloc (void *pointer);
   ###

   To solve this we can either declare 'elt' as 'void*elt' or
   'pointer' as 'const void*pointer', i.e. both const or both non-const.

   jemarch what do you suggest ?

I would declare 'pdf_hash_element_dispose_fn_t' to get a non-const
pointer. After all the function will destroy the memory pointed by
'elt', so conceptually it is not an IN parameter but a IN-OUT one :)

   After we fix this I'll send the patch.

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]