]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: add very basic support for composite pointers
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Jan 2014 22:04:39 +0000 (23:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 Jan 2014 22:34:45 +0000 (23:34 +0100)
commitbb519c7cd145454b8a1f8ad20e5acabfa436c7ea
tree7c565bd681638694f23d1e6e528d77d4092df4e6
parente9101695ef354d5e3e17e8e65d224f380aa841e5
MINOR: tools: add very basic support for composite pointers

Very often we want to associate one or two flags to a pointer, to
put a type on it or whatever. This patch provides this in standard.h
in the form of a few inline functions which combine a void * pointer
with an int and return an unsigned long called a composite address.
The functions allow to individuall set, retrieve both the pointer and
the flags. This is very similar to what is used in ebtree in fact.
include/common/standard.h