From 43e02f95aa6e24a828f0f6f13e256489b4f976b8 Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 18 Apr 2005 12:59:54 +0000 Subject: [PATCH] Include stdlib.h. (wordseg_propertize): Add dummy function for the case that wordcut library doesn't exist. (wordseg_propertize): Fix for old wordcut library. --- src/word-thai.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/word-thai.c b/src/word-thai.c index 17b2b7f..433e09f 100644 --- a/src/word-thai.c +++ b/src/word-thai.c @@ -157,12 +157,14 @@ wordseg_propertize (MText *mt, int pos, int from, int to, unsigned char *tis) M17N_OBJECT_UNREF (this); } + this = mtext_property (Mthai_wordseg, Mt, + MTEXTPROP_VOLATILE_WEAK | MTEXTPROP_NO_MERGE); last = from + wordcut_result.start[i]; - mtext_attach_property (mt, last, last + wordcut_result.offset[i], prop); + mtext_attach_property (mt, last, last + wordcut_result.offset[i], this); if (pos >= last && pos < last + wordcut_result.offset[i]) prop = this; else - m17n_object_unref (prop); + m17n_object_unref (this); last += wordcut_result.offset[i]; } return prop; -- 1.7.10.4