mercurial/cext/revlog.c
changeset 41052 4c25038c112c
parent 40963 2e305e54eae3
child 41078 46e0563c67db
--- a/mercurial/cext/revlog.c	Thu Dec 20 22:28:39 2018 -0500
+++ b/mercurial/cext/revlog.c	Mon Dec 03 07:44:08 2018 +0100
@@ -2866,6 +2866,7 @@
 
 void revlog_module_init(PyObject *mod)
 {
+	PyObject *caps = NULL;
 	HgRevlogIndex_Type.tp_new = PyType_GenericNew;
 	if (PyType_Ready(&HgRevlogIndex_Type) < 0)
 		return;
@@ -2885,6 +2886,12 @@
 	if (nullentry)
 		PyObject_GC_UnTrack(nullentry);
 
+	caps = PyCapsule_New(HgRevlogIndex_GetParents,
+	                     "mercurial.cext.parsers.index_get_parents_CAPI",
+	                     NULL);
+	if (caps != NULL)
+		PyModule_AddObject(mod, "index_get_parents_CAPI", caps);
+
 #ifdef WITH_RUST
 	rustlazyancestorsType.tp_new = PyType_GenericNew;
 	if (PyType_Ready(&rustlazyancestorsType) < 0)