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
6 files changed
tree: bf065a36ef1889bda01d12ce6f22ae6e39db3825
  1. bakefile/
  2. doc/
  3. example/
  4. include/
  5. macos/
  6. optim/
  7. os400/
  8. python/
  9. result/
  10. test/
  11. vms/
  12. VxWorks/
  13. win32/
  14. xstc/
  15. .gitignore
  16. acinclude.m4
  17. AUTHORS
  18. autogen.sh
  19. buf.c
  20. buf.h
  21. build_glob.py
  22. c14n.c
  23. catalog.c
  24. ChangeLog
  25. check-relaxng-test-suite.py
  26. check-relaxng-test-suite2.py
  27. check-xinclude-test-suite.py
  28. check-xml-test-suite.py
  29. check-xsddata-test-suite.py
  30. chvalid.c
  31. chvalid.def
  32. configure.ac
  33. Copyright
  34. dbgen.pl
  35. dbgenattr.pl
  36. debugXML.c
  37. dict.c
  38. DOCBparser.c
  39. elfgcchack.h
  40. enc.h
  41. encoding.c
  42. entities.c
  43. error.c
  44. genChRanges.py
  45. gentest.py
  46. genUnicode.py
  47. global.data
  48. globals.c
  49. HACKING
  50. hash.c
  51. HTMLparser.c
  52. HTMLtree.c
  53. INSTALL.libxml2
  54. legacy.c
  55. libxml-2.0-uninstalled.pc.in
  56. libxml-2.0.pc.in
  57. libxml.3
  58. libxml.h
  59. libxml.m4
  60. libxml.spec.in
  61. libxml2.doap
  62. libxml2.syms
  63. list.c
  64. MAINTAINERS
  65. Makefile.am
  66. Makefile.tests
  67. Makefile.win
  68. nanoftp.c
  69. nanohttp.c
  70. NEWS
  71. parser.c
  72. parserInternals.c
  73. pattern.c
  74. README
  75. README.cvs-commits
  76. README.tests
  77. regressions.py
  78. regressions.xml
  79. relaxng.c
  80. rngparser.c
  81. runsuite.c
  82. runtest.c
  83. runxmlconf.c
  84. save.h
  85. SAX.c
  86. SAX2.c
  87. schematron.c
  88. testapi.c
  89. testAutomata.c
  90. testC14N.c
  91. testchar.c
  92. testdict.c
  93. testdso.c
  94. testHTML.c
  95. testlimits.c
  96. testModule.c
  97. testOOM.c
  98. testOOMlib.c
  99. testOOMlib.h
  100. testReader.c
  101. testrecurse.c
  102. testRegexp.c
  103. testRelax.c
  104. testSAX.c
  105. testSchemas.c
  106. testThreads.c
  107. testThreadsWin32.c
  108. testURI.c
  109. testXPath.c
  110. threads.c
  111. timsort.h
  112. TODO
  113. TODO_SCHEMAS
  114. tree.c
  115. trio.c
  116. trio.h
  117. triodef.h
  118. trionan.c
  119. trionan.h
  120. triop.h
  121. triostr.c
  122. triostr.h
  123. uri.c
  124. valid.c
  125. xinclude.c
  126. xlink.c
  127. xml2-config.1
  128. xml2-config.in
  129. xml2Conf.sh.in
  130. xmlcatalog.c
  131. xmlIO.c
  132. xmllint.c
  133. xmlmemory.c
  134. xmlmodule.c
  135. xmlreader.c
  136. xmlregexp.c
  137. xmlsave.c
  138. xmlschemas.c
  139. xmlschemastypes.c
  140. xmlstring.c
  141. xmlunicode.c
  142. xmlwriter.c
  143. xpath.c
  144. xpointer.c
  145. xzlib.c
  146. xzlib.h