mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
compat_compiler: fix documentation for STRUCT_VAR_P
Previously we had said that off_t was a reasonable type to hold the result of offsetof(). That isn't so: ptrdiff_t is correct.
This commit is contained in:
@@ -195,7 +195,7 @@
|
||||
* structure <b>st</b>. Example:
|
||||
* <pre>
|
||||
* struct a { int foo; int bar; } x;
|
||||
* off_t bar_offset = offsetof(struct a, bar);
|
||||
* ptrdiff_t bar_offset = offsetof(struct a, bar);
|
||||
* int *bar_p = STRUCT_VAR_P(&x, bar_offset);
|
||||
* *bar_p = 3;
|
||||
* </pre>
|
||||
|
||||
Reference in New Issue
Block a user