diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2022-10-24 20:09:54 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2022-10-24 20:09:54 +0000 |
commit | 521d481d64f31607b713684b97d6eb2a0315e8b2 (patch) | |
tree | 52565958c4157eec8ef59af8837439dacef422f8 | |
parent | 8fe2e4d364e3edc8f7c2d5e7817593d2063abd52 (diff) | |
parent | 8e752b27335f77b7a83ef0eaea50c6b6d607ee4a (diff) | |
download | glib-521d481d64f31607b713684b97d6eb2a0315e8b2.tar.gz |
Merge branch 'wip/smcv/standard-offsetof' into 'main'
docs: Soft-deprecate G_STRUCT_OFFSET in favour of offsetof
See merge request GNOME/glib!3002
-rw-r--r-- | glib/docs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/glib/docs.c b/glib/docs.c index f93ce8048..631136d17 100644 --- a/glib/docs.c +++ b/glib/docs.c @@ -1829,7 +1829,12 @@ * * Returns the offset, in bytes, of a member of a struct. * - * Returns: the offset of @member from the start of @struct_type + * Consider using standard C `offsetof()`, available since at least C89 + * and C++98, in new code (but note that `offsetof()` returns a `size_t` + * rather than a `long`). + * + * Returns: the offset of @member from the start of @struct_type, + * as a value of type #glong. */ /** |