cext: move back finalization of dirstateTupleType where it should be

This commit is contained in:
Yuya Nishihara 2017-05-21 13:31:27 +09:00
parent d0f5db29a6
commit 0174b4e600
2 changed files with 3 additions and 2 deletions

View File

@ -944,6 +944,8 @@ static void module_init(PyObject *mod)
manifest_module_init(mod);
revlog_module_init(mod);
if (PyType_Ready(&dirstateTupleType) < 0)
return;
Py_INCREF(&dirstateTupleType);
PyModule_AddObject(mod, "dirstatetuple",
(PyObject *)&dirstateTupleType);

View File

@ -1930,8 +1930,7 @@ bail:
void revlog_module_init(PyObject *mod)
{
indexType.tp_new = PyType_GenericNew;
if (PyType_Ready(&indexType) < 0 ||
PyType_Ready(&dirstateTupleType) < 0)
if (PyType_Ready(&indexType) < 0)
return;
Py_INCREF(&indexType);
PyModule_AddObject(mod, "index", (PyObject *)&indexType);