summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-07-20 12:19:46 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-07-20 12:19:46 (GMT)
commitde4d1839553cd967745f67c2de7c125587185bd4 (patch)
treeba2887a9c5929fedb64910f7db7130890a26c25e /Objects
parentabfc4d838aed12ca650cf764fc7ac2ae1d778036 (diff)
downloadcpython-de4d1839553cd967745f67c2de7c125587185bd4.zip
cpython-de4d1839553cd967745f67c2de7c125587185bd4.tar.gz
cpython-de4d1839553cd967745f67c2de7c125587185bd4.tar.bz2
Issue #18327: Fix argument order in call to compatible_for_assignment(oldto, newto, attr).
The fix only affects the error message of __class__ assignment. CID 983564
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 0eea384..b8b5076 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3338,7 +3338,7 @@ object_set_class(PyObject *self, PyObject *value, void *closure)
"__class__ assignment: only for heap types");
return -1;
}
- if (compatible_for_assignment(newto, oldto, "__class__")) {
+ if (compatible_for_assignment(oldto, newto, "__class__")) {
Py_INCREF(newto);
Py_TYPE(self) = newto;
Py_DECREF(oldto);