As far as I understand it's code, it never modifies modifies content of things passed, and having no const-correctness forces users to use a cast for nothing.
I did a change in the version I have on disk, which is obviously insufficient but allows to avoid cast when using std::string::c_str() from the C++ STL (without useless casting). Patch attached.
PS: that patch does not have correct line numbers, because I made another change in this file (segfault fix). I would have send a push request, but can't figure how to commit partial files with mercurial.