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:
parent
d9335077dd
commit
92bff86614
2
parser.c
2
parser.c
@ -10882,8 +10882,6 @@ xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt) {
|
||||
if ((ctxt == NULL) || (ctxt->input == NULL))
|
||||
return(-1);
|
||||
|
||||
xmlDefaultSAXHandlerInit();
|
||||
|
||||
xmlDetectSAX2(ctxt);
|
||||
|
||||
GROW;
|
||||
|
@ -1554,7 +1554,7 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
xmlDefaultSAXHandlerInit();
|
||||
xmlInitParser();
|
||||
|
||||
if (ctxt->dict == NULL)
|
||||
ctxt->dict = xmlDictCreate();
|
||||
|
@ -216,7 +216,7 @@ testRegexpFile(const char *filename) {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
xmlInitMemory();
|
||||
xmlInitParser();
|
||||
|
||||
if (argc == 1) {
|
||||
int ret;
|
||||
|
@ -278,7 +278,7 @@ int main(int argc, char **argv) {
|
||||
char *filename = NULL;
|
||||
int i;
|
||||
|
||||
xmlInitMemory();
|
||||
xmlInitParser();
|
||||
|
||||
if (argc <= 1) {
|
||||
usage(argv[0]);
|
||||
|
@ -169,7 +169,6 @@ int main(int argc, char **argv) {
|
||||
printf("\t--memory : test the schemas in memory parsing\n");
|
||||
#endif
|
||||
}
|
||||
xmlRelaxNGCleanupTypes();
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
|
@ -160,7 +160,6 @@ int main(int argc, char **argv) {
|
||||
#endif
|
||||
}
|
||||
failed_schemas:
|
||||
xmlSchemaCleanupTypes();
|
||||
xmlCleanupParser();
|
||||
xmlMemoryDump();
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user