diff -ruN scim-anthy-1.2.2.org/src/scim_anthy_action.cpp scim-anthy-1.2.2/src/scim_anthy_action.cpp --- scim-anthy-1.2.2.org/src/scim_anthy_action.cpp 2006-07-13 16:41:51.000000000 +0900 +++ scim-anthy-1.2.2/src/scim_anthy_action.cpp 2006-12-22 13:57:21.171131000 +0900 @@ -49,9 +49,14 @@ bool Action::perform (AnthyInstance *performer) { +#if 0 + // Error: Cannot call through pointer to member function before + // defining class AnthyInstance. if (m_pmf) return (performer->*m_pmf) (); else if (m_func) +#endif + if (m_func) return m_func (performer); return false; @@ -64,9 +69,12 @@ return false; if (match_key_event (key)) { +#if 0 if (m_pmf) return (performer->*m_pmf) (); else if (m_func) +#endif + if (m_func) return m_func (performer); } diff -ruN scim-anthy-1.2.2.org/src/scim_anthy_conversion.cpp scim-anthy-1.2.2/src/scim_anthy_conversion.cpp --- scim-anthy-1.2.2.org/src/scim_anthy_conversion.cpp 2006-10-30 14:10:51.000000000 +0900 +++ scim-anthy-1.2.2/src/scim_anthy_conversion.cpp 2006-12-22 13:41:57.191560000 +0900 @@ -387,10 +387,11 @@ } else { int len = anthy_get_segment (m_anthy_context, real_seg, cand, NULL, 0); if (len > 0) { - char buf[len + 1]; + char *buf = new char[len + 1]; anthy_get_segment (m_anthy_context, real_seg, cand, buf, len + 1); buf[len] = '\0'; m_iconv.convert (segment_str, buf, len); + delete[] buf; } } @@ -534,7 +535,7 @@ if (len <= 0) continue; - char buf[len + 1]; + char *buf = new char[len + 1]; anthy_get_prediction (m_anthy_context, i, buf, len + 1); buf[len] = '\0'; @@ -542,6 +543,7 @@ m_iconv.convert (cand, buf); table.append_candidate (cand); + delete[] buf; } #endif /* HAS_ANTHY_PREDICTION */ } else if (is_converting ()) { @@ -571,7 +573,7 @@ if (len <= 0) continue; - char buf[len + 1]; + char *buf = new char[len + 1]; anthy_get_segment (m_anthy_context, real_segment_id, i, buf, len + 1); @@ -579,6 +581,7 @@ m_iconv.convert (cand_wide, buf, len); table.append_candidate (cand_wide); + delete[] buf; } table.set_cursor_pos (get_selected_candidate ()); @@ -800,13 +803,14 @@ if (len <= 0) return WideString (); - char buf[len + 1]; + char *buf = new char[len + 1]; anthy_get_prediction (m_anthy_context, candidate_id, buf, len + 1); buf[len] = '\0'; WideString cand; m_iconv.convert (cand, buf); + delete[] buf; return cand; #else /* HAS_ANTHY_PREDICTION */ return WideString (); diff -ruN scim-anthy-1.2.2.org/src/scim_anthy_table_editor.cpp scim-anthy-1.2.2/src/scim_anthy_table_editor.cpp --- scim-anthy-1.2.2.org/src/scim_anthy_table_editor.cpp 2005-10-04 19:28:51.000000000 +0900 +++ scim-anthy-1.2.2/src/scim_anthy_table_editor.cpp 2006-12-22 13:41:57.192590000 +0900 @@ -24,6 +24,7 @@ #include "scim_anthy_table_editor.h" #include +#include #include #include "scim_anthy_intl.h" @@ -205,7 +206,7 @@ if (n_cols <= 0) return; - GType types[n_cols]; + GType *types = (GType *)calloc(n_cols, sizeof(GType)); for (gint i = 0; i < n_cols; i++) types[i] = G_TYPE_STRING; @@ -276,6 +277,7 @@ // clean g_object_unref (store); + free(types); } const char * diff -ruN scim-anthy-1.2.2.org/src/scim_anthy_utils.cpp scim-anthy-1.2.2/src/scim_anthy_utils.cpp --- scim-anthy-1.2.2.org/src/scim_anthy_utils.cpp 2005-11-06 10:25:02.000000000 +0900 +++ scim-anthy-1.2.2/src/scim_anthy_utils.cpp 2006-12-22 13:41:57.193361000 +0900 @@ -273,7 +273,7 @@ /* split string */ unsigned int len = strlen (command); - char tmp[len + 1]; + char *tmp = new char[len + 1]; strncpy (tmp, command, len); tmp[len] = '\0'; @@ -293,7 +293,7 @@ if (array.size () <= 0) return; array.push_back (NULL); - char *args[array.size()]; + char **args = new char*[array.size()]; for (unsigned int i = 0; i < array.size (); i++) args[i] = array[i]; @@ -322,6 +322,8 @@ int status; waitpid(child_pid, &status, 0); } + delete[] tmp; + delete[] args; } }