From b40107e9c3349c1c712b320c27ef631e6f76da26 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 26 Jan 2001 16:27:38 +0000 Subject: [PATCH] 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. --- lib/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2