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

Changeset 3902

Show
Ignore:
Timestamp:
08/22/08 16:27:06 (3 months ago)
Author:
sean
Message:

Reversed TypeInfo?_Struct.compare() result when the supplied structs have an opCmp defined. For some reason, this was returning the opposite of what it should on DMD. On GDC I just cut out the broken, unused DMD code.

Files:

Legend:

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

    r3879 r3902  
    794794                    c = 1; 
    795795                else if (xopCmp) 
    796             c = (*xopCmp)(p2, p1); 
     796                { 
     797            c = (*xopCmp)(p1, p2); 
     798        } 
    797799                else 
     800                { 
    798801                    // BUG: relies on the GC not moving objects 
    799802                    c = memcmp(p1, p2, init.length); 
     803                } 
    800804            } 
    801805            else 
  • trunk/lib/compiler/gdc/genobj.d

    r3879 r3902  
    799799                    c = 1; 
    800800                else if (xopCmp) 
    801                 { 
    802                     version (GNU) // GDC and DMD use different calling conventions 
    803                         c = (*xopCmp)(p1, p2); 
    804                     else 
    805                         c = (*xopCmp)(p2, p1); 
    806                 } 
     801                    c = (*xopCmp)(p1, p2); 
    807802                else 
    808803                    // BUG: relies on the GC not moving objects