diff --git a/ChangeLog b/ChangeLog index 6695c10cb..c56003fc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-04-28 Adam Fedor + + * Source/include/FastArray.x (FastArrayInsertionPosition): + 'Dereference' union object value (on PPC's at least, the union + address may not be the same as the address of the first type in + the union). + (FastArrayCheckSort): Likewise. + 1999-04-27 Adam Fedor * configure.in: Check for sys/mount.h for NSFileManager functions diff --git a/Headers/gnustep/base/FastArray.x b/Headers/gnustep/base/FastArray.x index f86819d06..39373bcec 100644 --- a/Headers/gnustep/base/FastArray.x +++ b/Headers/gnustep/base/FastArray.x @@ -224,7 +224,7 @@ FastArrayInsertionPosition(FastArray array, FastArrayItem item, int (*sorter)()) */ for (index = upper/2; upper != lower; index = lower+(upper-lower)/2) { - int comparison = (*sorter)(item, array->ptr[index]); + int comparison = (*sorter)(item.obj, (array->ptr[index]).obj); if (comparison < 0) { @@ -243,7 +243,7 @@ FastArrayInsertionPosition(FastArray array, FastArrayItem item, int (*sorter)()) * Now skip past any equal items so the insertion point is AFTER any * items that are equal to the new one. */ - while (index < array->count && (*sorter)(item, array->ptr[index]) >= 0) + while (index < array->count && (*sorter)(item.obj, (array->ptr[index]).obj) >= 0) { index++; } @@ -259,7 +259,7 @@ FastArrayCheckSort(FastArray array, int (*sorter)()) for (i = 1; i < array->count; i++) { - NSCAssert(((*sorter)(array->ptr[i-1], array->ptr[i]) <= 0), + NSCAssert(((*sorter)((array->ptr[i-1]).obj, (array->ptr[i]).obj) <= 0), NSInvalidArgumentException); } }