mercurial/parsers.c
changeset 24214 a5f1bccd2996
parent 24032 c53bc2e52514
child 24443 539b3c7eea44
equal deleted inserted replaced
24213:e0c1328df872 24214:a5f1bccd2996
    69 }
    69 }
    70 
    70 
    71 /*
    71 /*
    72  * Turn a hex-encoded string into binary.
    72  * Turn a hex-encoded string into binary.
    73  */
    73  */
    74 static PyObject *unhexlify(const char *str, int len)
    74 PyObject *unhexlify(const char *str, int len)
    75 {
    75 {
    76 	PyObject *ret;
    76 	PyObject *ret;
    77 	char *d;
    77 	char *d;
    78 	int i;
    78 	int i;
    79 
    79 
  2316 			"parse v1 obsolete markers\n"},
  2316 			"parse v1 obsolete markers\n"},
  2317 	{NULL, NULL}
  2317 	{NULL, NULL}
  2318 };
  2318 };
  2319 
  2319 
  2320 void dirs_module_init(PyObject *mod);
  2320 void dirs_module_init(PyObject *mod);
       
  2321 void manifest_module_init(PyObject *mod);
  2321 
  2322 
  2322 static void module_init(PyObject *mod)
  2323 static void module_init(PyObject *mod)
  2323 {
  2324 {
  2324 	/* This module constant has two purposes.  First, it lets us unit test
  2325 	/* This module constant has two purposes.  First, it lets us unit test
  2325 	 * the ImportError raised without hard-coding any error text.  This
  2326 	 * the ImportError raised without hard-coding any error text.  This
  2330 	 * recompile.  Note that this means the pure-Python version of parsers
  2331 	 * recompile.  Note that this means the pure-Python version of parsers
  2331 	 * should not have this module constant. */
  2332 	 * should not have this module constant. */
  2332 	PyModule_AddStringConstant(mod, "versionerrortext", versionerrortext);
  2333 	PyModule_AddStringConstant(mod, "versionerrortext", versionerrortext);
  2333 
  2334 
  2334 	dirs_module_init(mod);
  2335 	dirs_module_init(mod);
       
  2336 	manifest_module_init(mod);
  2335 
  2337 
  2336 	indexType.tp_new = PyType_GenericNew;
  2338 	indexType.tp_new = PyType_GenericNew;
  2337 	if (PyType_Ready(&indexType) < 0 ||
  2339 	if (PyType_Ready(&indexType) < 0 ||
  2338 	    PyType_Ready(&dirstateTupleType) < 0)
  2340 	    PyType_Ready(&dirstateTupleType) < 0)
  2339 		return;
  2341 		return;