Enable arg reversal on x86 by default. Make change to TypeInfo_Struct.compare to accomodate for it.

This commit is contained in:
Christian Kamm
2008-10-26 21:16:21 +01:00
parent 4c12540497
commit d3bb0b74bd
2 changed files with 7 additions and 3 deletions

View File

@@ -800,7 +800,11 @@ class TypeInfo_Struct : TypeInfo
{ if (!p2)
c = 1;
else if (xopCmp)
c = (*xopCmp)(p1, p2);
// the x86 D calling conv requires the this arg to be last here
version(X86)
c = (*xopCmp)(p2, p1);
else
c = (*xopCmp)(p1, p2);
else
// BUG: relies on the GC not moving objects
c = memcmp(p1, p2, m_init.length);