We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#define HandlerFromOverlaped(ptr) ((ExtendHandle*)((char*)ptr - (char*)&((ExtendHandle*)NULL)->_overlapped)) 我不明白,这个((ExtendHandle*)NULL)->_overlapped,这个不会有问题么?
The text was updated successfully, but these errors were encountered:
你说的这个 ((ExtendHandle*)NULL)->_overlapped 其实就是 offset() 宏所做的 (msvc/gcc 都有), 而这整个意思估计就是 container_of() 宏, 在 gcc 中 container_of() 有更安全的写法
((ExtendHandle*)NULL)->_overlapped
offset()
container_of()
Sorry, something went wrong.
No branches or pull requests
#define HandlerFromOverlaped(ptr) ((ExtendHandle*)((char*)ptr - (char*)&((ExtendHandle*)NULL)->_overlapped))
我不明白,这个((ExtendHandle*)NULL)->_overlapped,这个不会有问题么?
The text was updated successfully, but these errors were encountered: