diff mercurial/parsers.c @ 24214:a5f1bccd2996

manifest.c: new extension code to lazily parse manifests This lets us iterate manifests in order, but do a _lot_ less work in the common case when we only care about a few manifest entries. Many thanks to Mike Edgar for reviewing this in advance of it going out to the list, which caught many things I missed. This version of the patch includes C89 fixes from Sean Farley and many correctness/efficiency cleanups from Martin von Zweigbergk. Thanks to both!
author Augie Fackler <augie@google.com>
date Tue, 13 Jan 2015 14:31:38 -0800
parents c53bc2e52514
children 539b3c7eea44
line wrap: on
line diff
--- a/mercurial/parsers.c	Thu Mar 05 22:16:28 2015 -0800
+++ b/mercurial/parsers.c	Tue Jan 13 14:31:38 2015 -0800
@@ -71,7 +71,7 @@
 /*
  * Turn a hex-encoded string into binary.
  */
-static PyObject *unhexlify(const char *str, int len)
+PyObject *unhexlify(const char *str, int len)
 {
 	PyObject *ret;
 	char *d;
@@ -2318,6 +2318,7 @@
 };
 
 void dirs_module_init(PyObject *mod);
+void manifest_module_init(PyObject *mod);
 
 static void module_init(PyObject *mod)
 {
@@ -2332,6 +2333,7 @@
 	PyModule_AddStringConstant(mod, "versionerrortext", versionerrortext);
 
 	dirs_module_init(mod);
+	manifest_module_init(mod);
 
 	indexType.tp_new = PyType_GenericNew;
 	if (PyType_Ready(&indexType) < 0 ||