Mercurial > projects > ldc
comparison dmd/root.c @ 1110:fd631764eaac
Revert removal of "+2" from Outbuffer::reserve function for x64. Unless
somone can fix this properly, then the "+2" must stay in or tango won't
build.
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Thu, 12 Mar 2009 17:10:24 -0600 |
parents | b30fe7e1dbb9 |
children | 0f8aeb31678c |
comparison
equal
deleted
inserted
replaced
1109:97d80437cb80 | 1110:fd631764eaac |
---|---|
1389 void OutBuffer::reserve(unsigned nbytes) | 1389 void OutBuffer::reserve(unsigned nbytes) |
1390 { | 1390 { |
1391 //printf("OutBuffer::reserve: size = %d, offset = %d, nbytes = %d\n", size, offset, nbytes); | 1391 //printf("OutBuffer::reserve: size = %d, offset = %d, nbytes = %d\n", size, offset, nbytes); |
1392 if (size - offset < nbytes) | 1392 if (size - offset < nbytes) |
1393 { | 1393 { |
1394 size = (offset + nbytes) * 2; | 1394 #if defined (__x86_64__) |
1395 size = (offset + nbytes) * 2 + 2; | |
1396 #else | |
1397 size = (offset + nbytes) * 2 + 2; | |
1398 #endif | |
1395 data = (unsigned char *)mem.realloc(data, size); | 1399 data = (unsigned char *)mem.realloc(data, size); |
1396 } | 1400 } |
1397 } | 1401 } |
1398 | 1402 |
1399 void OutBuffer::reset() | 1403 void OutBuffer::reset() |