mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-06-13 19:21:37 +03:00
patch from Stphane Bidoul for setting up threads global defaults. this
* build_glob.py global.data globals.c parser.c include/libxml/globals.h: patch from Stphane Bidoul for setting up threads global defaults. * doc/libxml2-api.xml: this extends the API with new functions * python/tests/Makefile.am python/tests/reader2.py python/tests/thread2.py: integrated the associated testcase and fixed the error string used in reader2 Daniel
This commit is contained in:
@ -1267,6 +1267,7 @@ libxml_xmlErrorInitialize(void)
|
||||
printf("libxml_xmlErrorInitialize() called\n");
|
||||
#endif
|
||||
xmlSetGenericErrorFunc(NULL, libxml_xmlErrorFuncHandler);
|
||||
xmlThrDefSetGenericErrorFunc(NULL, libxml_xmlErrorFuncHandler);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
@ -1767,7 +1768,7 @@ libxml_xpathCallbacksInitialize(void)
|
||||
printf("libxml_xpathCallbacksInitialized called\n");
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (i = 0; i < libxml_xpathCallbacksMax; i++) {
|
||||
libxml_xpathCallbacks[i].ctx = NULL;
|
||||
libxml_xpathCallbacks[i].name = NULL;
|
||||
libxml_xpathCallbacks[i].ns_uri = NULL;
|
||||
@ -2620,6 +2621,8 @@ initlibxml2mod(void)
|
||||
|
||||
if (initialized != 0)
|
||||
return;
|
||||
/* XXX xmlInitParser does much more than this */
|
||||
xmlInitGlobals();
|
||||
xmlRegisterDefaultOutputCallbacks();
|
||||
xmlRegisterDefaultInputCallbacks();
|
||||
m = Py_InitModule((char *) "libxml2mod", libxmlMethods);
|
||||
|
Reference in New Issue
Block a user