GNOME Bugzilla – Bug 589795
Support for free functions which take a pointer to a pointer
Last modified: 2009-08-01 15:47:45 UTC
Some libraries use a free function of the form void foo_free (Foo ** foo) instead of the much more common void foo_free (Foo * foo) The logic seems to be that they can set the pointer to null in the free function. libftdi uses this convention, though they added wrappers specifically for the vala bindings in their API. libdmtx also uses this convention, and I could ask them to add wrappers to their API, but seeing as how this is the second library like this that I've come across, it might be common enough that it would be worth supporting in vala.
Created attachment 139246 [details] [review] Create a free_function_address_of CCode attribute.
commit fbee40cdf5483c5747e80f6661aeeda15d1725d4 Author: Evan Nemerson <evan@polussystems.com> Date: Sat Aug 1 17:44:45 2009 +0200 Support [CCode (free_function_address_of = true)] attribute Fixes bug 589795.