subclass_compare(): As reported by Neil Schemenauer, instances of
an ExtensionClass type that get into this code can raise RuntimeWarning under Python 2.3, because the comparison result may be outside the set {-1, 0, 1}. Worse, on a box where sizeof(ptrdiff_t) > sizeof(int) (all 64-bit platforms), comparison results across a set of objects could be inconsistent because the implicit cast of pointer subtraction to int loses the information-carrying sign bit.
Showing
Please register or sign in to comment