From: Ondrej Zajicek Date: Wed, 2 Oct 2013 12:57:29 +0000 (+0200) Subject: Implements C.len operator for clist and eclist types. X-Git-Tag: v1.4.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ccb36d3308ef57d340e663f0cabd24663f4f62a;p=thirdparty%2Fbird.git Implements C.len operator for clist and eclist types. Thanks to Sergey Popovich for the original patch. --- diff --git a/doc/bird.sgml b/doc/bird.sgml index f43eb4bf4..050acf33a 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1077,6 +1077,8 @@ incompatible with each other (that is to prevent you from shooting in the foot). no literals of this type. There are three special operators on clists: + returns the length of clist add( adds pair (or quad) length / 4; } +static inline int ec_set_get_size(struct adata *list) +{ return list->length / 8; } + static inline u32 *int_set_get_data(struct adata *list) { return (u32 *) list->data; }