]> granicus.if.org Git - python/commit
Issue #9869: Make long() and PyNumber_Long return something of type
authorMark Dickinson <dickinsm@gmail.com>
Sun, 26 Sep 2010 10:37:12 +0000 (10:37 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 26 Sep 2010 10:37:12 +0000 (10:37 +0000)
commitcb61e5d9b59c1a5f18dd34edebb054d1e19f1581
treea52fa36e6297747487027f5d2344696a112df566
parent3eac591a5c33f4bd0bdd60a76053cd3b6b6e5918
Issue #9869: Make long() and PyNumber_Long return something of type
long for a class whose __long__ method returns a plain int.  This
fixes an interpreter crash (due to long_subtype_new assuming
PyNumber_Long returns a long) when initializing an instance of a long
subclass from an object whose __long__ method returns a plain int.
Lib/test/test_class.py
Lib/test/test_long.py
Misc/NEWS
Objects/abstract.c