mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: __offsetof keyword for C offsetof() macro
This commit is contained in:

committed by
Alexander Medvednikov

parent
31b7991a93
commit
8512c9fc9d
@ -20,6 +20,10 @@ const (
|
||||
#define TCCSKIP(x)
|
||||
#endif
|
||||
|
||||
// for __offset_of
|
||||
#define __offsetof(s,memb) \\
|
||||
((size_t)((char *)&((s *)0)->memb - (char *)0))
|
||||
|
||||
#define OPTION_CAST(x) (x)
|
||||
'
|
||||
c_headers = '
|
||||
|
Reference in New Issue
Block a user