4 ms·
Yeah, i know you can even do it without providing the type: #define wl_container_of(ptr, sample, member) \ (void*)((char *)(ptr) + ((char*)(sample)
by ogoffart 8y ago
Yeah, i know you can even do it without providing the type:
#define wl_container_of(ptr, sample, member) \
(void*)((char *)(ptr) + ((char*)(sample) - (char*)(&(sample)->member)))