MINOR: xref: Add a new xref system
authorThierry FOURNIER <thierry.fournier@ozon.io>
Thu, 31 Aug 2017 18:35:18 +0000 (20:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Sep 2017 16:59:40 +0000 (18:59 +0200)
commit3c65b7a91673895d69dfad8d022865af8a42a305
treea64febcbbaf366663779047ac42b152dfc0cf92f
parentb01d28f9766c96ebe4d29b9e8cc0c24c689fc03f
MINOR: xref: Add a new xref system

xref is used to create a relation between two elements.
Once an element is released, it breaks the relation. If the
relation is already broken, it frees the xref struct.
The pointer between two elements is a sort of refcount with
max value 1. The relation is only between two elements.
The pointer and the type of element a and b are conventional.

Note that xref is initialised from Lua files because Lua is
the only one user.
include/common/xref.h [new file with mode: 0644]