From: MORIOKA Tomohiko Date: Tue, 16 Apr 2013 01:10:24 +0000 (+0900) Subject: (concord_object_get_feature_value): Use `cos_read_int' to parse X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8e5b0977192e005e5b1c25f585c76a38befe5455;p=chise%2Fconcord.git (concord_object_get_feature_value): Use `cos_read_int' to parse integer. --- diff --git a/cos.c b/cos.c index 9e09502..303b2dd 100644 --- a/cos.c +++ b/cos.c @@ -416,6 +416,7 @@ concord_object_get_feature_value (COS_object object, COS_object feature) size_t end; int val_cid; COS_String val_str; + COS_object val_obj; if (COS_OBJECT_CHAR_P (object)) { @@ -440,6 +441,12 @@ concord_object_get_feature_value (COS_object object, COS_object feature) concord_feature_get_name (fobj), cos_string_data (val_string)); + val_obj = cos_read_int (CONCORD_String_data (&val_st), + CONCORD_String_size (&val_st), + 0, &end); + if ( val_obj != NULL ) + return val_obj; + val_cid = cos_read_char (CONCORD_String_data (&val_st), CONCORD_String_size (&val_st), 0, &end);