From: tomo Date: Wed, 28 Jun 2006 19:10:17 +0000 (+0000) Subject: (concord_object_put): New function. X-Git-Tag: r21-4-19-chise-0_23-2^20~52 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=64bdea6edab3157065caa33fe2bf570158b8f8f7;p=chise%2Fxemacs-chise.git (concord_object_put): New function. (Fconcord_object_put): Use `concord_object_put'. --- diff --git a/src/concord.c b/src/concord.c index f8b37c8..ce37c95 100644 --- a/src/concord.c +++ b/src/concord.c @@ -648,10 +648,9 @@ Return the value of OBJECT's FEATURE. return Qnil; } -DEFUN ("concord-object-put", Fconcord_object_put, 3, 3, 0, /* -Store a VALUE of OBJECT's FEATURE. -*/ - (object, feature, value)) +static Lisp_Object +concord_object_put (Lisp_Object object, Lisp_Object feature, + Lisp_Object value) { struct gcpro gcpro1, gcpro2, gcpro3; int previous_print_readably; @@ -664,7 +663,6 @@ Store a VALUE of OBJECT's FEATURE. Lisp_Object value_string; char* c_value; - CHECK_CONCORD_OBJECT (object); if ( !STRINGP(feature) ) feature = Fsymbol_name (feature); previous_print_readably = print_readably; @@ -700,7 +698,7 @@ Store a VALUE of OBJECT's FEATURE. status = chise_feature_sync (c_feature); if (status) return Qnil; - if (feature_name[0] == '=') + if (XSTRING_DATA(feature)[0] == '=') { CONCORD_INDEX c_index = concord_genre_get_index (c_genre, feature_name); @@ -711,6 +709,17 @@ Store a VALUE of OBJECT's FEATURE. return Qt; } +DEFUN ("concord-object-put", Fconcord_object_put, 3, 3, 0, /* +Store a VALUE of OBJECT's FEATURE. +*/ + (object, feature, value)) +{ + CHECK_CONCORD_OBJECT (object); + if ( NILP (concord_object_put (object, feature, value)) ) + return Qnil; + return Qt; +} + struct closure_for_object_spec { char* object_id;