mercurial/cext/parsers.c
changeset 42303 e240bec26626
parent 42096 509a0477b3a6
child 42343 d8e55c0c642c
--- a/mercurial/cext/parsers.c	Mon May 06 22:48:09 2019 +0200
+++ b/mercurial/cext/parsers.c	Mon May 06 22:50:34 2019 +0200
@@ -671,6 +671,7 @@
 
 static void module_init(PyObject *mod)
 {
+	PyObject *capsule = NULL;
 	PyModule_AddIntConstant(mod, "version", version);
 
 	/* This module constant has two purposes.  First, it lets us unit test
@@ -687,6 +688,12 @@
 	manifest_module_init(mod);
 	revlog_module_init(mod);
 
+	capsule = PyCapsule_New(
+	    make_dirstate_tuple,
+	    "mercurial.cext.parsers.make_dirstate_tuple_CAPI", NULL);
+	if (capsule != NULL)
+		PyModule_AddObject(mod, "make_dirstate_tuple_CAPI", capsule);
+
 	if (PyType_Ready(&dirstateTupleType) < 0) {
 		return;
 	}