[Tomoe-cvs 1213] CVS update: tomoe/recognizer

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
2006年 11月 27日 (月) 20:29:43 JST


Index: tomoe/recognizer/tomoe-recognizer-simple-logic.c
diff -u tomoe/recognizer/tomoe-recognizer-simple-logic.c:1.36 tomoe/recognizer/tomoe-recognizer-simple-logic.c:1.37
--- tomoe/recognizer/tomoe-recognizer-simple-logic.c:1.36	Mon Nov 27 20:19:58 2006
+++ tomoe/recognizer/tomoe-recognizer-simple-logic.c	Mon Nov 27 20:29:43 2006
@@ -17,7 +17,7 @@
  *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  *  Boston, MA  02111-1307  USA
  *
- *  $Id: tomoe-recognizer-simple-logic.c,v 1.36 2006/11/27 11:19:58 ikezoe Exp $
+ *  $Id: tomoe-recognizer-simple-logic.c,v 1.37 2006/11/27 11:29:43 ikezoe Exp $
  */
 
 #include <stdlib.h>
@@ -49,8 +49,8 @@
     GArray          *adapted_strokes;
 };
 
-static cand_priv *cand_priv_new               (TomoeChar   *character);
-static void       cand_priv_free              (cand_priv   *cand_p);
+static cand_priv *cand_priv_new               (TomoeCandidate *candidate);
+static void       cand_priv_free              (cand_priv      *cand_p);
 static GPtrArray *get_candidates              (GList       *points,
                                                GPtrArray   *cands);
 static gint       match_stroke_num            (TomoeChar   *chr,
@@ -95,9 +95,8 @@
     for (node = target_chars; node; node = g_list_next (node)) {
         TomoeCandidate *candidate = node->data;
         cand_priv *cand;
-        cand = cand_priv_new (tomoe_candidate_get_char (candidate));
+        cand = cand_priv_new (candidate);
         g_ptr_array_add (first_cands, cand);
-        g_object_unref (candidate);
     }
     g_list_free (target_chars);
 
@@ -210,12 +209,12 @@
  */
 
 static cand_priv *
-cand_priv_new (TomoeChar *character)
+cand_priv_new (TomoeCandidate *cand)
 {
     cand_priv *cand_p;
 
     cand_p                  = g_new (cand_priv, 1);
-    cand_p->cand            = tomoe_candidate_new (character);
+    cand_p->cand            = cand;
     cand_p->adapted_strokes = g_array_new (FALSE, FALSE, sizeof (gint));
 
     return cand_p;


tomoe-cvs メーリングリストの案内
Back to archive index