Extracted MEMCHECK into an extra function to avoid a gcc-2.95.2
compiler bug.
This commit is contained in:
parent
ea1576b538
commit
a0f9e71875
|
@ -104,16 +104,19 @@ DEFAULT_DEBUG_CHANNEL(region);
|
||||||
/*
|
/*
|
||||||
* Check to see if there is enough memory in the present region.
|
* Check to see if there is enough memory in the present region.
|
||||||
*/
|
*/
|
||||||
#define MEMCHECK(reg, rect, firstrect){\
|
|
||||||
if ((reg)->numRects >= ((reg)->size - 1)){\
|
static inline int xmemcheck(WINEREGION *reg, LPRECT *rect, LPRECT *firstrect ) {
|
||||||
(firstrect) = HeapReAlloc( GetProcessHeap(), 0, \
|
if (reg->numRects >= (reg->size - 1)) {
|
||||||
(firstrect), (2 * (sizeof(RECT)) * ((reg)->size)));\
|
*firstrect = HeapReAlloc( GetProcessHeap(), 0, *firstrect, (2 * (sizeof(RECT)) * (reg->size)));
|
||||||
if ((firstrect) == 0)\
|
if (*firstrect == 0)
|
||||||
return;\
|
return 0;
|
||||||
(reg)->size *= 2;\
|
reg->size *= 2;
|
||||||
(rect) = &(firstrect)[(reg)->numRects];\
|
*rect = (*firstrect)+reg->numRects;
|
||||||
}\
|
}
|
||||||
}
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MEMCHECK(reg, rect, firstrect) xmemcheck(reg,&(rect),&(firstrect))
|
||||||
|
|
||||||
#define EMPTY_REGION(pReg) { \
|
#define EMPTY_REGION(pReg) { \
|
||||||
(pReg)->numRects = 0; \
|
(pReg)->numRects = 0; \
|
||||||
|
|
Loading…
Reference in New Issue