SHZ_CONTAINER_OF
#define SHZ_CONTAINER_OF(ptr, type, member) ((type*)((char*)(ptr) - offsetof(type, member)))Returns the containing structure from a pointer to one of its members.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
ptr | ||
type | ||
member |
Availability
Section titled “Availability”- C++ equivalent: none (usable from C++ as is)
- Back-ends: n/a (not a function)
- Defined in:
sh4zam/shz_cdefs.h:135 - Module: Compiler Definitions, section "Utilities"