Commit a0f9e718 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Extracted MEMCHECK into an extra function to avoid a gcc-2.95.2

compiler bug.
parent ea1576b5
...@@ -104,16 +104,19 @@ DEFAULT_DEBUG_CHANNEL(region); ...@@ -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; \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment