mirror of https://github.com/python/cpython
Patch from SF bug 570483 (Tim Northover).
In a fresh interpreter, type.mro(tuple) would segfault, because PyType_Ready() isn't called for tuple yet. To fix, call PyType_Ready(type) if type->tp_dict is NULL.
This commit is contained in:
parent
63517577fd
commit
a96b0df624
|
@ -3169,6 +3169,12 @@ def do_this_first():
|
|||
except:
|
||||
pass
|
||||
|
||||
if verbose:
|
||||
print "Testing SF bug 570483..."
|
||||
# Another segfault only when run early
|
||||
# (before PyType_Ready(tuple) is called)
|
||||
type.mro(tuple)
|
||||
|
||||
def test_main():
|
||||
do_this_first()
|
||||
class_docstrings()
|
||||
|
|
Loading…
Reference in New Issue