Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #159280
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: container_of macro... |
| Date | 2021-03-10 17:05 -0800 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <s2bqcu$16oj$1@gioia.aioe.org> (permalink) |
| References | <s26io0$nne$1@gioia.aioe.org> <20210309075236.629@kylheku.com> |
On 3/9/2021 7:59 AM, Kaz Kylheku wrote: > On 2021-03-09, Chris M. Thomasson <chris.m.thomasson.1@gmail.com> wrote: >> How many people here use it? > > If you put the contained structure as the first member, you don't need > this; just a straight cast. Indeed! > > That takes care of probably more than the proverbial 95% of the > situations. > Well, the macro gives one the flexibility to add a node to an existing structure that might not like replacing its existing first member.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
container_of macro... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-03-08 17:24 -0800
Re: container_of macro... Öö Tiib <ootiib@hot.ee> - 2021-03-09 02:06 -0800
Re: container_of macro... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-03-10 17:02 -0800
Re: container_of macro... Kaz Kylheku <563-365-8930@kylheku.com> - 2021-03-09 15:59 +0000
Re: container_of macro... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-03-09 17:35 +0000
Re: container_of macro... Kaz Kylheku <563-365-8930@kylheku.com> - 2021-03-09 17:51 +0000
Re: container_of macro... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-03-10 17:13 -0800
Re: container_of macro... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-03-10 17:05 -0800
Re: container_of macro... William Ahern <william@25thandClement.com> - 2021-03-09 18:56 -0800
Re: container_of macro... Kaz Kylheku <563-365-8930@kylheku.com> - 2021-03-10 03:47 +0000
Re: container_of macro... William Ahern <william@25thandClement.com> - 2021-03-12 17:01 -0800
Re: container_of macro... Jim <jim.cromie@gmail.com> - 2021-03-16 22:14 -0700
Re: container_of macro... "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-03-10 17:07 -0800
csiph-web