mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
make sure xmlCtxtReadFile and htmlCtxtReadFile go through the catalog
* HTMLparser.c parser.c: make sure xmlCtxtReadFile and htmlCtxtReadFile go through the catalog resolution. * gentest.py testapi.c: fix a side effect wrning of the change Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Fri Nov 26 11:44:36 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* HTMLparser.c parser.c: make sure xmlCtxtReadFile and htmlCtxtReadFile
|
||||||
|
go through the catalog resolution.
|
||||||
|
* gentest.py testapi.c: fix a side effect wrning of the change
|
||||||
|
|
||||||
Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com>
|
Wed Nov 24 13:41:52 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* dict.c include/libxml/dict.h: added xmlDictExists() to the
|
* dict.c include/libxml/dict.h: added xmlDictExists() to the
|
||||||
|
@@ -6038,7 +6038,7 @@ htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename,
|
|||||||
|
|
||||||
htmlCtxtReset(ctxt);
|
htmlCtxtReset(ctxt);
|
||||||
|
|
||||||
stream = xmlNewInputFromFile(ctxt, filename);
|
stream = xmlLoadExternalEntity(filename, NULL, ctxt);
|
||||||
if (stream == NULL) {
|
if (stream == NULL) {
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
@@ -165,7 +165,7 @@ skipped_memcheck = [ "xmlLoadCatalog", "xmlAddEncodingAlias",
|
|||||||
"xmlCatalogRemove", "xmlLoadCatalogs", "xmlCleanupCharEncodingHandlers",
|
"xmlCatalogRemove", "xmlLoadCatalogs", "xmlCleanupCharEncodingHandlers",
|
||||||
"xmlInitCharEncodingHandlers", "xmlCatalogCleanup",
|
"xmlInitCharEncodingHandlers", "xmlCatalogCleanup",
|
||||||
"xmlSchemaGetBuiltInType",
|
"xmlSchemaGetBuiltInType",
|
||||||
"htmlParseFile", # loads the catalogs
|
"htmlParseFile", "htmlCtxtReadFile" # loads the catalogs
|
||||||
]
|
]
|
||||||
|
|
||||||
#
|
#
|
||||||
|
2
parser.c
2
parser.c
@@ -12732,7 +12732,7 @@ xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename,
|
|||||||
|
|
||||||
xmlCtxtReset(ctxt);
|
xmlCtxtReset(ctxt);
|
||||||
|
|
||||||
stream = xmlNewInputFromFile(ctxt, filename);
|
stream = xmlLoadExternalEntity(filename, NULL, ctxt);
|
||||||
if (stream == NULL) {
|
if (stream == NULL) {
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
12
testapi.c
12
testapi.c
@@ -1537,7 +1537,6 @@ test_htmlCtxtReadFile(void) {
|
|||||||
int test_ret = 0;
|
int test_ret = 0;
|
||||||
|
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
int mem_base;
|
|
||||||
htmlDocPtr ret_val;
|
htmlDocPtr ret_val;
|
||||||
htmlParserCtxtPtr ctxt; /* an HTML parser context */
|
htmlParserCtxtPtr ctxt; /* an HTML parser context */
|
||||||
int n_ctxt;
|
int n_ctxt;
|
||||||
@@ -1552,7 +1551,6 @@ test_htmlCtxtReadFile(void) {
|
|||||||
for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
|
for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {
|
||||||
for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
|
for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {
|
||||||
for (n_options = 0;n_options < gen_nb_int;n_options++) {
|
for (n_options = 0;n_options < gen_nb_int;n_options++) {
|
||||||
mem_base = xmlMemBlocks();
|
|
||||||
ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
|
ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);
|
||||||
filename = gen_filepath(n_filename, 1);
|
filename = gen_filepath(n_filename, 1);
|
||||||
encoding = gen_const_char_ptr(n_encoding, 2);
|
encoding = gen_const_char_ptr(n_encoding, 2);
|
||||||
@@ -1566,16 +1564,6 @@ test_htmlCtxtReadFile(void) {
|
|||||||
des_const_char_ptr(n_encoding, (const char *)encoding, 2);
|
des_const_char_ptr(n_encoding, (const char *)encoding, 2);
|
||||||
des_int(n_options, options, 3);
|
des_int(n_options, options, 3);
|
||||||
xmlResetLastError();
|
xmlResetLastError();
|
||||||
if (mem_base != xmlMemBlocks()) {
|
|
||||||
printf("Leak of %d blocks found in htmlCtxtReadFile",
|
|
||||||
xmlMemBlocks() - mem_base);
|
|
||||||
test_ret++;
|
|
||||||
printf(" %d", n_ctxt);
|
|
||||||
printf(" %d", n_filename);
|
|
||||||
printf(" %d", n_encoding);
|
|
||||||
printf(" %d", n_options);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user