aboutsummaryrefslogtreecommitdiffstats
path: root/buf.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2014-10-13 16:06:21 +0800
committerDaniel Veillard <veillard@redhat.com>2014-10-13 16:06:21 +0800
commit95ebe53b50dfcff1fc5378309bc4f3c58173298e (patch)
treebf065a36ef1889bda01d12ce6f22ae6e39db3825 /buf.c
parent12fd65434037d50429587792ed2e7e98f2fb739b (diff)
downloadandroid_external_libxml2-95ebe53b50dfcff1fc5378309bc4f3c58173298e.tar.gz
android_external_libxml2-95ebe53b50dfcff1fc5378309bc4f3c58173298e.tar.bz2
android_external_libxml2-95ebe53b50dfcff1fc5378309bc4f3c58173298e.zip
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
Diffstat (limited to 'buf.c')
-rw-r--r--buf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/buf.c b/buf.c
index d1756c4a..6efc7b67 100644
--- a/buf.c
+++ b/buf.c
@@ -565,7 +565,7 @@ xmlBufDump(FILE *file, xmlBufPtr buf) {
*/
xmlChar *
-xmlBufContent(const xmlBufPtr buf)
+xmlBufContent(const xmlBuf *buf)
{
if ((!buf) || (buf->error))
return NULL;
@@ -583,7 +583,7 @@ xmlBufContent(const xmlBufPtr buf)
*/
xmlChar *
-xmlBufEnd(const xmlBufPtr buf)
+xmlBufEnd(xmlBufPtr buf)
{
if ((!buf) || (buf->error))
return NULL;