Skip to content

Commit

Permalink
const up
Browse files Browse the repository at this point in the history
  • Loading branch information
Caolán McNamara committed Apr 28, 2016
1 parent 1e9767a commit 971f8a9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/hunspell/hunspell.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class HunspellImpl
int suggest(char*** slst, const char* word);
const std::string& get_wordchars() const;
const std::vector<w_char>& get_wordchars_utf16() const;
char* get_dic_encoding();
const char* get_dic_encoding();
int add(const std::string& word);
int add_with_affix(const std::string& word, const std::string& example);
int remove(const std::string& word);
Expand Down Expand Up @@ -1254,11 +1254,11 @@ void Hunspell::free_list(char*** slst, int n) {
freelist(slst, n);
}

char* Hunspell::get_dic_encoding() {
const char* Hunspell::get_dic_encoding() {
return m_Impl->get_dic_encoding();
}

char* HunspellImpl::get_dic_encoding() {
const char* HunspellImpl::get_dic_encoding() {
return encoding;
}

Expand Down Expand Up @@ -1935,7 +1935,7 @@ int Hunspell_spell(Hunhandle* pHunspell, const char* word) {
return ((Hunspell*)pHunspell)->spell(std::string(word));
}

char* Hunspell_get_dic_encoding(Hunhandle* pHunspell) {
const char* Hunspell_get_dic_encoding(Hunhandle* pHunspell) {
return ((Hunspell*)pHunspell)->get_dic_encoding();
}

Expand Down
2 changes: 1 addition & 1 deletion src/hunspell/hunspell.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ LIBHUNSPELL_DLL_EXPORTED int Hunspell_add_dic(Hunhandle* pHunspell,
*/
LIBHUNSPELL_DLL_EXPORTED int Hunspell_spell(Hunhandle* pHunspell, const char*);

LIBHUNSPELL_DLL_EXPORTED char* Hunspell_get_dic_encoding(Hunhandle* pHunspell);
LIBHUNSPELL_DLL_EXPORTED const char* Hunspell_get_dic_encoding(Hunhandle* pHunspell);

/* suggest(suggestions, word) - search suggestions
* input: pointer to an array of strings pointer and the (bad) word
Expand Down
2 changes: 1 addition & 1 deletion src/hunspell/hunspell.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class LIBHUNSPELL_DLL_EXPORTED Hunspell {

void free_list(char*** slst, int n);

char* get_dic_encoding();
const char* get_dic_encoding();

/* morphological functions */

Expand Down
2 changes: 1 addition & 1 deletion src/tools/hunspell.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ char* chenc(char* st, const char* enc1, const char* enc2) {
TextParser* get_parser(int format, const char* extension, Hunspell* pMS) {
TextParser* p = NULL;
int io_utf8 = 0;
char* denc = pMS->get_dic_encoding();
const char* denc = pMS->get_dic_encoding();
#ifdef HAVE_ICONV
initialize_utf_tbl(); // also need for 8-bit tokenization
if (io_enc) {
Expand Down

0 comments on commit 971f8a9

Please sign in to comment.