On Wednesday 15 June 2011 18:06:03 Cedric BAIL wrote: > On Wed, Jun 15, 2011 at 5:53 PM, Mike Blumenkrantz <m...@zentific.com> wrote: > > On Wed, 15 Jun 2011 08:46:11 -0700 > > > >> /** > >> + * @brief Redefine the callback that clean the data of a hash > >> + * > >> + * @param hash The given hash table > >> + * @param data_free_cb The function called on each value when the hash > >> + * table is freed. @c NULL can be passed as callback. > >> +EAPI void > >> +eina_hash_free_set(Eina_Hash *hash, Eina_Free_Cb data_free_cb) > >> +{ > >> + EINA_MAGIC_CHECK_HASH(hash); > >> + EINA_SAFETY_ON_NULL_RETURN(hash); > >> + > >> + hash->data_free_cb = data_free_cb; > >> +} > >> + [...] > > I feel like this name is somewhat misleading... > > I didn't like it either, if you have a better proposal...
Call the thing "deallocator". Question: - If that thing is NULL, does that mean the memory isn't released or does it use free() as a default deallocation function? Is there a default function already set? - Have you considered a void pointer as context to the deallocation function? Uli ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel