From: Martin Mares Date: Fri, 26 Jan 2001 16:27:38 +0000 (+0000) Subject: obj_add_attr() now returns head of the attribute value chain, so that you X-Git-Tag: holmes-import~1568 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b40107e9c3349c1c712b320c27ef631e6f76da26;p=libucw.git obj_add_attr() now returns head of the attribute value chain, so that you can easily do: struct oattr *a; a = obj_add_attr(obj, NULL, 'x', "val1"); a = obj_add_attr(obj, a, 'x', "val2"); to insert multi-valued attributes quickly. --- diff --git a/lib/object.c b/lib/object.c index d1246152..839bc65e 100644 --- a/lib/object.c +++ b/lib/object.c @@ -220,5 +220,5 @@ obj_add_attr(struct odes *o, struct oattr *a, uns x, byte *v) b = oa_new(o, x, v); a->last_same->same = b; a->last_same = b; - return b; + return a; }