[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANNOUNCE] Lua 5.0 (pre-release) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 02 Apr 2003 16:44:54 -0300
// >>>> Original code: block = l_realloc(block, oldsize, size);
if(block == NULL)
{
block = HeapAlloc(GetProcessHeap(),0,size);
} else
{
block = HeapReAlloc(GetProcessHeap(),0,block,size);
}
What about this?
#define l_realloc(b,o,s) (b==NULL) ? HeapAlloc(GetProcessHeap(),0,s) : \
HeapReAlloc(GetProcessHeap(),0,b,s)
-- Roberto