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