Control: tags -1 patch Hi xiao,
This happens because in the following call: if (g_pattern_match_string(pspec, syn_file->getWord(i, CollationLevel_NONE, 0))) g_pattern_match_string expects a gchar* while getWord() returns a const gchar* Given the function is deprecated, it might simply work to replace it with the non-deprecated one -- which even the logs suggest Other than this, there's stuff like: gchar *nextchar = g_utf8_next_char(sWord); Where a implicit conversion was happening which is no longer the case. The below patch gets the package building for me. --- a/dict/src/lib/stddict.cpp +++ b/dict/src/lib/stddict.cpp @@ -1463,7 +1463,7 @@ int iIndexCount=0; for (glong i=0; i<narticles() && iIndexCount<iBuffLen-1; i++) // Need to deal with same word in index? But this will slow down processing in most case. - if (g_pattern_match_string(pspec, idx_file->getWord(i, CollationLevel_NONE, 0))) + if (g_pattern_spec_match_string(pspec, idx_file->getWord(i, CollationLevel_NONE, 0))) aIndex[iIndexCount++]=i; aIndex[iIndexCount]= -1; // -1 is the end. return (iIndexCount>0); @@ -1476,7 +1476,7 @@ int iIndexCount=0; for (glong i=0; i<nsynarticles() && iIndexCount<iBuffLen-1; i++) // Need to deal with same word in index? But this will slow down processing in most case. - if (g_pattern_match_string(pspec, syn_file->getWord(i, CollationLevel_NONE, 0))) + if (g_pattern_spec_match_string(pspec, syn_file->getWord(i, CollationLevel_NONE, 0))) aIndex[iIndexCount++]=i; aIndex[iIndexCount]= -1; // -1 is the end. return (iIndexCount>0); @@ -2538,7 +2538,7 @@ } // Upper the first character and lower others. if (!bFound) { - gchar *nextchar = g_utf8_next_char(sWord); + gchar *nextchar = const_cast<gchar*>(g_utf8_next_char(sWord)); gchar *firstchar = g_utf8_strup(sWord, nextchar - sWord); nextchar = g_utf8_strdown(nextchar, -1); casestr = g_strdup_printf("%s%s", firstchar, nextchar); @@ -2648,7 +2648,7 @@ } // Upper the first character and lower others. if (!bFound) { - gchar *nextchar = g_utf8_next_char(sWord); + gchar *nextchar = const_cast<gchar*>(g_utf8_next_char(sWord)); gchar *firstchar = g_utf8_strup(sWord, nextchar - sWord); nextchar = g_utf8_strdown(nextchar, -1); casestr = g_strdup_printf("%s%s", firstchar, nextchar);
signature.asc
Description: PGP signature