[PATCH 05/12] Implement C.len operator for clist and eclist types.

Ondrej Zajicek santiago at crfreenet.org
Thu Oct 3 13:28:14 CEST 2013


On Mon, Sep 30, 2013 at 09:30:38PM +0300, Sergey Popovich wrote:
> Add C.len operator just like for bgppath type to get number of
> elements in lists. Thats also enables to check if list is empty
> by checking if number of elements is zero.

Applied, thanks.

Although with minor changes:

+    case T_CLIST:  res.val.i = int_set_get_size(v1.val.ad); break;
+    case T_ECLIST: res.val.i = ec_set_get_size(v1.val.ad); break;

instead of:

+    case T_CLIST:  res.val.i = v1.val.ad->length / 4; break;
+    case T_ECLIST: res.val.i = v1.val.ad->length / 8; break;

-- 
Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20131003/22e44bdf/attachment.asc>


More information about the Bird-users mailing list