Kaydet (Commit) a7b9b3cc authored tarafından Guido van Rossum's avatar Guido van Rossum

Use PyType_Ready() for initialization of the ob_type field of our

types (the tp_base field must be initialized prior to that call).
üst 8efd6cee
......@@ -242,11 +242,13 @@ initxxsubtype(void)
/* Fill in the deferred data addresses. This must be done before
PyType_Ready() is called. */
spamdict_type.ob_type = &PyType_Type;
spamdict_type.tp_base = &PyDict_Type;
if (PyType_Ready(&spamdict_type) < 0)
return;
spamlist_type.ob_type = &PyType_Type;
spamlist_type.tp_base = &PyList_Type;
if (PyType_Ready(&spamlist_type) < 0)
return;
m = Py_InitModule3("xxsubtype",
xxsubtype_functions,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment