mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
try to initalize all builtin types with PyType_Ready to avoid problems like #5787
This commit is contained in:
parent
baba195eb2
commit
d4d400cb8a
4 changed files with 83 additions and 16 deletions
|
@ -606,14 +606,6 @@ int _PyFrame_Init()
|
|||
builtin_object = PyString_InternFromString("__builtins__");
|
||||
if (builtin_object == NULL)
|
||||
return 0;
|
||||
/*
|
||||
Traceback objects are not created the normal way (through calling the
|
||||
type), so PyType_Ready has to be called here.
|
||||
*/
|
||||
if (PyType_Ready(&PyTraceBack_Type)) {
|
||||
Py_DECREF(builtin_object);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue