GNOME Bugzilla – Bug 689483
const qualifier
Last modified: 2014-10-13 08:08:49 UTC
Created attachment 230444 [details] [review] Patch to add more const qualifiers Hi, 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. Kurt
And old one, but a good one ! It applied nearly perfectly and yes those are good improvements, thanks a lot ! I'm sure it took quite some time to build that patch and sorry it took so long, it's not lost, now commited: https://git.gnome.org/browse/libxml2/commit/?id=95ebe53b50dfcff1fc5378309bc4f3c58173298e thanks again ! Daniel