diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2021-04-26 17:32:20 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2021-04-26 17:32:20 (GMT) |
commit | 55e86052e0522ac7b51743449055572cc8bc7823 (patch) | |
tree | 7f69870aea5296850947967e567706538082dae5 /src/portable_c.c | |
parent | 51316839084c3292a8fb216e73ed146683028d4a (diff) | |
download | Doxygen-55e86052e0522ac7b51743449055572cc8bc7823.zip Doxygen-55e86052e0522ac7b51743449055572cc8bc7823.tar.gz Doxygen-55e86052e0522ac7b51743449055572cc8bc7823.tar.bz2 |
Fix issues caused by QCString::rawData and QCString::operator[]
- methods were marked const but still returned a non-const reference,
cause wrongly optimized code for some platforms/compilers
Diffstat (limited to 'src/portable_c.c')
-rw-r--r-- | src/portable_c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/portable_c.c b/src/portable_c.c index 3a79741..fe81844 100644 --- a/src/portable_c.c +++ b/src/portable_c.c @@ -13,7 +13,7 @@ // These functions are implemented in a C file, because there are different // versions of the iconv() prototype, some with a const pointer and some // without. In C this is just a warning, but in C++ breaks the compilation. -// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the +// Looking at the LIBICONV_VERSION is not enough, since for MACOSX the // const and non-const version exist with the same version of the file. void * portable_iconv_open(const char* tocode, const char* fromcode) @@ -21,10 +21,10 @@ void * portable_iconv_open(const char* tocode, const char* fromcode) return iconv_open(tocode,fromcode); } -size_t portable_iconv (void *cd, char** inbuf, size_t *inbytesleft, +size_t portable_iconv (void *cd, const char** inbuf, size_t *inbytesleft, char** outbuf, size_t *outbytesleft) { - return iconv((iconv_t)cd,inbuf,inbytesleft,outbuf,outbytesleft); + return iconv((iconv_t)cd,(char**)inbuf,inbytesleft,outbuf,outbytesleft); } int portable_iconv_close (void *cd) |