[PATCH 1 of 3] cext: move back finalization of dirstateTupleType where it should be
Yuya Nishihara
yuya at tcha.org
Sun May 21 06:02:02 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1495341087 -32400
# Sun May 21 13:31:27 2017 +0900
# Node ID 429ef6c0fa3c16ff776cd6aeff27d2f27c2fc7d3
# Parent b9942bc6b292aa9b16ad80fceb765dab4f1c777c
cext: move back finalization of dirstateTupleType where it should be
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -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);
diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -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);
More information about the Mercurial-devel
mailing list