container_of: add container_off_var macro
Based on patch by Andrey Smirnov <andrew.smirnov@gmail.com>: There is are certain use-cases when it is necessary to know the offset of the member in a structure's memory layout. One such use-case can be seen in `ccan/list/list.h' in macros `list_for_each' and `list_for_each_safe'. This commit implements said functionality with `container_of_var_off' macro. Renamed container_of_var_off -> container_off_var now we have container_off.
Showing
Please register or sign in to comment