зеркало из https://github.com/mozilla/pjs.git
We were breaking Python's rules for comparison result returns - and
this only started mattering in Python 2.3. Not part of the build.
This commit is contained in:
Родитель
9b54824d02
Коммит
d1e853d30c
|
@ -174,7 +174,8 @@ Py_nsIID::PyTypeMethod_compare(PyObject *self, PyObject *other)
|
||||||
{
|
{
|
||||||
Py_nsIID *s_iid = (Py_nsIID *)self;
|
Py_nsIID *s_iid = (Py_nsIID *)self;
|
||||||
Py_nsIID *o_iid = (Py_nsIID *)other;
|
Py_nsIID *o_iid = (Py_nsIID *)other;
|
||||||
return memcmp(&s_iid->m_iid, &o_iid->m_iid, sizeof(s_iid->m_iid));
|
int rc = memcmp(&s_iid->m_iid, &o_iid->m_iid, sizeof(s_iid->m_iid));
|
||||||
|
return rc == 0 ? 0 : (rc < 0 ? -1 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ PyObject *
|
/* static */ PyObject *
|
||||||
|
|
Загрузка…
Ссылка в новой задаче