Allowing anonymous structs and unions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux