2 years ago
#8029
SeCi
What is the equivalent of container_of in Delphi?
I am translating code from C++ source code to delphi language. What exactly does this resource do and how can I write it in delphi ?
#define container_of(inner, outer_t, elem) ((outer_t*)((char*)(inner)-offsetof(outer_t, elem)))
#define to_output_file_callback(_o) container_of((_o), struct output_file_callback, out)
c++
delphi
type-conversion
offset
pascal
0 Answers
Your Answer