]> git.kaiwu.me - haproxy.git/commit
MINOR: obj: provide a safe and an unsafe access to pointed objects
authorWilly Tarreau <w@1wt.eu>
Sun, 29 Sep 2013 07:15:31 +0000 (09:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 14:40:22 +0000 (15:40 +0100)
commit66337a0784974c15b87b970f519c5b2e61e5294d
tree3fe73e3fc8c16270571939561b2b54a2b4dc2058
parent6fe1541285c0e1bc6ba3151053856a4e1c1c1da2
MINOR: obj: provide a safe and an unsafe access to pointed objects

Most of the times, the caller of objt_<type>(ptr) will know that <ptr>
is valid and of the correct type (eg: in an "if" condition). Let's provide
an unsafe variant that does not perform the check again for these usages.
The new functions are called "__objt_<type>".
include/proto/obj_type.h
include/types/obj_type.h