"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "contrib/spoa_example/include/mini-clist.h" between
haproxy-2.0.13.tar.gz and haproxy-2.0.14.tar.gz

About: HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. LTS (Long-Term Support) release.

mini-clist.h  (haproxy-2.0.13):mini-clist.h  (haproxy-2.0.14)
skipping to change at line 47 skipping to change at line 47
#define LIST_ADDQ(lh, el) ({ (el)->p = (lh)->p; (el)->p->n = (lh)->p = (el); (el )->n = (lh); (el); }) #define LIST_ADDQ(lh, el) ({ (el)->p = (lh)->p; (el)->p->n = (lh)->p = (el); (el )->n = (lh); (el); })
/* removes an element from a list and returns it */ /* removes an element from a list and returns it */
#define LIST_DEL(el) ({ typeof(el) __ret = (el); (el)->n->p = (el)->p; (el)->p-> n = (el)->n; (__ret); }) #define LIST_DEL(el) ({ typeof(el) __ret = (el); (el)->n->p = (el)->p; (el)->p-> n = (el)->n; (__ret); })
/* returns a pointer of type <pt> to a structure containing a list head called /* returns a pointer of type <pt> to a structure containing a list head called
* <el> at address <lh>. Note that <lh> can be the result of a function or macro * <el> at address <lh>. Note that <lh> can be the result of a function or macro
* since it's used only once. * since it's used only once.
* Example: LIST_ELEM(cur_node->args.next, struct node *, args) * Example: LIST_ELEM(cur_node->args.next, struct node *, args)
*/ */
#define LIST_ELEM(lh, pt, el) ((pt)(((void *)(lh)) - ((void *)&((pt)NULL)->el))) #define LIST_ELEM(lh, pt, el) ((pt)(((const char *)(lh)) - ((size_t)&((pt)NULL)- >el)))
/* checks if the list head <lh> is empty or not */ /* checks if the list head <lh> is empty or not */
#define LIST_ISEMPTY(lh) ((lh)->n == (lh)) #define LIST_ISEMPTY(lh) ((lh)->n == (lh))
/* returns a pointer of type <pt> to a structure following the element /* returns a pointer of type <pt> to a structure following the element
* which contains list head <lh>, which is known as element <el> in * which contains list head <lh>, which is known as element <el> in
* struct pt. * struct pt.
* Example: LIST_NEXT(args, struct node *, list) * Example: LIST_NEXT(args, struct node *, list)
*/ */
#define LIST_NEXT(lh, pt, el) (LIST_ELEM((lh)->n, pt, el)) #define LIST_NEXT(lh, pt, el) (LIST_ELEM((lh)->n, pt, el))
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)