mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
Fix and add const qualifiers
For https://bugzilla.gnome.org/show_bug.cgi?id=689483 It seems there are functions that do use the const qualifier for some of the arguments, but it seems that there are a lot of functions that don't use it and probably should. So I created a patch against 2.9.0 that makes as much as possible const in tree.h, and changed other files as needed. There were a lot of cases like "const xmlNodePtr node". This doesn't actually do anything, there the *pointer* is constant not the object it points to. So I changed those to "const xmlNode *node". I also removed some consts, mostly in the Copy functions, because those functions can actually modify the doc or node they copy from
This commit is contained in:
committed by
Daniel Veillard
parent
12fd654340
commit
95ebe53b50
@@ -103,7 +103,7 @@ XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetPredefinedEntity (const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetDocEntity (xmlDocPtr doc,
|
||||
xmlGetDocEntity (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetDtdEntity (xmlDocPtr doc,
|
||||
@@ -120,7 +120,7 @@ XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlEncodeSpecialChars (xmlDocPtr doc,
|
||||
xmlEncodeSpecialChars (const xmlDoc *doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
|
||||
xmlCreateEntitiesTable (void);
|
||||
|
||||
Reference in New Issue
Block a user