[libxml2] Make HTML parser functions take const pointers
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Make HTML parser functions take const pointers
- Date: Sat, 17 Jun 2017 15:33:22 +0000 (UTC)
commit 576912fa04e3cab5876d94a99a9a2bb60b5fd0d1
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sat Jun 17 15:59:13 2017 +0200
Make HTML parser functions take const pointers
The 'cur' parameter of htmlParseDoc and htmlSAXParseDoc should be
'const xmlChar *'.
Fixes bug 770650.
HTMLparser.c | 5 +++--
include/libxml/HTMLparser.h | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/HTMLparser.c b/HTMLparser.c
index 22ec576..e4f816e 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -6278,7 +6278,8 @@ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, void *user_data,
*/
htmlDocPtr
-htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData) {
+htmlSAXParseDoc(const xmlChar *cur, const char *encoding,
+ htmlSAXHandlerPtr sax, void *userData) {
htmlDocPtr ret;
htmlParserCtxtPtr ctxt;
@@ -6317,7 +6318,7 @@ htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void
*/
htmlDocPtr
-htmlParseDoc(xmlChar *cur, const char *encoding) {
+htmlParseDoc(const xmlChar *cur, const char *encoding) {
return(htmlSAXParseDoc(cur, encoding, NULL, NULL));
}
diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h
index 551186c..1d4fec2 100644
--- a/include/libxml/HTMLparser.h
+++ b/include/libxml/HTMLparser.h
@@ -115,12 +115,12 @@ XMLPUBFUN htmlParserCtxtPtr XMLCALL
XMLPUBFUN int XMLCALL
htmlParseDocument(htmlParserCtxtPtr ctxt);
XMLPUBFUN htmlDocPtr XMLCALL
- htmlSAXParseDoc (xmlChar *cur,
+ htmlSAXParseDoc (const xmlChar *cur,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
XMLPUBFUN htmlDocPtr XMLCALL
- htmlParseDoc (xmlChar *cur,
+ htmlParseDoc (const xmlChar *cur,
const char *encoding);
XMLPUBFUN htmlDocPtr XMLCALL
htmlSAXParseFile(const char *filename,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]