From 64bdea6edab3157065caa33fe2bf570158b8f8f7 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 28 Jun 2006 19:10:17 +0000 Subject: [PATCH] (concord_object_put): New function. (Fconcord_object_put): Use `concord_object_put'. --- src/concord.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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; -- 1.7.10.4