RE: another emi2 bugfix

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>



> -----Original Message-----
> From: Harrie Hazewinkel [mailto:[email protected]]

> This is where the pointer can be made NULL:
> void *ptr = gw_malloc(1);
> gw_free(ptr);
> ptr = NULL;
> 
> This is where it cannot:
> gw_free(gw_malloc(1));
> 
> There is no explicit pointer.

Ho.
In that case, how about something like this (not sure it'll work in ANSI C, but it looks nice ;-) :
#defined define gw_free(ptr) {void **p &= ptr;gw_native_free(p); *ptr=NULL;}

--
Oded Arbel
m-Wise mobile solutions
[email protected]

+972-9-9581711 (116)
+972-67-340014

::..
I wonder when we'll find the answer to all the april snow...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.