[pulseaudio-discuss] Allowing anonymous structs and unions
Tanu Kaskinen
tanuk at iki.fi
Fri Sep 25 02:51:30 PDT 2015
On Thu, 2015-09-24 at 23:21 +0200, Ahmed S. Darwish wrote:
> OK, after a second look, it seems that the anonymous structure indeed
> does not provide any extra benefit. So I believe everyone now agrees
> now that the following definitions are the most appropriate:
>
> typedef struct {
> pa_mem mem; /* Parent; must be first */
> int fd;
> } pa_memfd;
>
> typedef struct {
> pa_mem mem; /* Parent; must be first */
> int id;
> bool do_unlink;
> } pa_shm;
>
> Good :-)
>
> But I can't get my head around not using the anonymous unions, and
> basically whether they provide any perceived disadvantage:
I don't think Arun objected to the use of anonymous unions. I certainly
don't see anything wrong with using anonymous unions in pa_mempool.
--
Tanu
More information about the pulseaudio-discuss
mailing list