diff --git a/mercurial/parsers.c b/mercurial/parsers.c
index 20a9d823f242f00c3b8c2f0d7ce4c4e081cf11eb_bWVyY3VyaWFsL3BhcnNlcnMuYw==..48e42f9840744f51a0912f280624fa5d06484846_bWVyY3VyaWFsL3BhcnNlcnMuYw== 100644
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -1092,7 +1092,6 @@
 	0,                         /* tp_dictoffset */
 	(initproc)index_init,      /* tp_init */
 	0,                         /* tp_alloc */
-	PyType_GenericNew,         /* tp_new */
 };
 
 /*
@@ -1150,6 +1149,7 @@
 
 static void module_init(PyObject *mod)
 {
+	indexType.tp_new = PyType_GenericNew;
 	if (PyType_Ready(&indexType) < 0)
 		return;
 	Py_INCREF(&indexType);