Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3418

Show
Ignore:
Timestamp:
04/07/08 19:34:50 (8 months ago)
Author:
sean
Message:

Applied DMD 1.028 changes. Left old license in place however.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/compiler/dmd/arraycat.d

    r1856 r3418  
    4141{ 
    4242    debug printf("f = %p,%d, t = %p,%d, size = %d\n", 
    43                  cast(void*)from, from.length, cast(void*)to, to.length, size); 
     43                 from.ptr, from.length, to.ptr, to.length, size); 
    4444 
    4545    if (to.length != from.length) 
     
    4747        throw new Exception("lengths don't match for array copy"); 
    4848    } 
    49     else if (cast(byte *)to + to.length * size <= cast(byte *)from || 
    50         cast(byte *)from + from.length * size <= cast(byte *)to
     49    else if (to.ptr + to.length * size <= from.ptr || 
     50             from.ptr + from.length * size <= to.ptr
    5151    { 
    52         memcpy(cast(byte *)to, cast(byte *)from, to.length * size); 
     52        memcpy(to.ptr, from.ptr, to.length * size); 
    5353    } 
    5454    else 
    5555    { 
    5656        throw new Exception("overlapping array copy"); 
    57 
     57   
    5858    return to; 
    5959} 
  • trunk/lib/compiler/gdc/arraycat.d

    r1856 r3418  
    4141{ 
    4242    debug printf("f = %p,%d, t = %p,%d, size = %d\n", 
    43                  cast(void*)from, from.length, cast(void*)to, to.length, size); 
     43                 from.ptr, from.length, to.ptr, to.length, size); 
    4444 
    4545    if (to.length != from.length) 
     
    4747        throw new Exception("lengths don't match for array copy"); 
    4848    } 
    49     else if (cast(byte *)to + to.length * size <= cast(byte *)from || 
    50         cast(byte *)from + from.length * size <= cast(byte *)to
     49    else if (to.ptr + to.length * size <= from.ptr || 
     50             from.ptr + from.length * size <= to.ptr
    5151    { 
    52         memcpy(cast(byte *)to, cast(byte *)from, to.length * size); 
     52        memcpy(to.ptr, from.ptr, to.length * size); 
    5353    } 
    5454    else