On 30.07.2012 21:06, Arvydas Sidorenko wrote: > I assume nobody have tried to compile Awesome with GNU uncompatible > compiler for ages and thus non-__GNUC__ p_delete version got > overlooked for quite some time. > First of all, a problem I see is that it assigns void** to a variable > of type void* and then dereferences the same void* variable. > None of the compilers I am aware of will let you go through this > without an error. > And second of all, lets have one portable p_delete. > > Signed-off-by: Arvydas Sidorenko <asi...@gmail.com> [...] > -#define p_delete(mem_p) \ > - do { \ > - void *__ptr = (mem_p); \ > - free(*__ptr); \ > - *(void **)__ptr = NULL; \ > - } while (0)
Wow, that looks quite wrong. Pushed, thanks! Uli -- "Every once in a while, declare peace. It confuses the hell out of your enemies" - 79th Rule of Acquisition -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.