1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-09 04:58:16 +03:00

Fix calls to deprecated init/cleanup functions

Only use xmlInitParser/xmlCleanupParser.
This commit is contained in:
Nick Wellnhofer 2022-03-29 14:18:31 +02:00
parent d9335077dd
commit 92bff86614
7 changed files with 5 additions and 8 deletions

View File

@ -10882,8 +10882,6 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
if ((ctxt == NULL) || (ctxt->input == NULL))
return(-1);
xmlDefaultSAXHandlerInit();
xmlDetectSAX2(ctxt);
GROW;

View File

@ -1554,7 +1554,7 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
return(-1);
}
xmlDefaultSAXHandlerInit();
xmlInitParser();
if (ctxt->dict == NULL)
ctxt->dict = xmlDictCreate();

View File

@ -216,7 +216,7 @@ testRegexpFile(const char *filename) {
int main(int argc, char **argv) {
xmlInitMemory();
xmlInitParser();
if (argc == 1) {
int ret;

View File

@ -278,7 +278,7 @@ int main(int argc, char **argv) {
char *filename = NULL;
int i;
xmlInitMemory();
xmlInitParser();
if (argc <= 1) {
usage(argv[0]);

View File

@ -169,7 +169,6 @@ int main(int argc, char **argv) {
printf("\t--memory : test the schemas in memory parsing\n");
#endif
}
xmlRelaxNGCleanupTypes();
xmlCleanupParser();
xmlMemoryDump();

View File

@ -160,7 +160,6 @@ int main(int argc, char **argv) {
#endif
}
failed_schemas:
xmlSchemaCleanupTypes();
xmlCleanupParser();
xmlMemoryDump();

View File

@ -130,6 +130,8 @@ int main(int argc, char **argv) {
int usefile = 0;
char *filename = NULL;
xmlInitParser();
for (i = 1; i < argc ; i++) {
#if defined(LIBXML_XPTR_ENABLED)
if ((!strcmp(argv[i], "-xptr")) || (!strcmp(argv[i], "--xptr")))
@ -158,7 +160,6 @@ int main(int argc, char **argv) {
xmlSubstituteEntitiesDefaultValue = 1;
#ifdef LIBXML_SAX1_ENABLED
if (nocdata != 0) {
xmlDefaultSAXHandlerInit();
xmlDefaultSAXHandler.cdataBlock = NULL;
}
#endif