Re: [PATCH v2 12/19] hashmap: use *_entry APIs to wrap container_of

2019-09-25 Thread Derrick Stolee
On 9/23/2019 9:03 PM, Eric Wong wrote: > Using `container_of' can be verbose and choosing names for > intermediate "struct hashmap_entry" pointers is a hard problem. > So introduce "*_entry" APIs inspired by similar linked-list > APIs in the Linux kernel. > > Unfortunately, `__typeof__' is not por

[PATCH v2 12/19] hashmap: use *_entry APIs to wrap container_of

2019-09-23 Thread Eric Wong
Using `container_of' can be verbose and choosing names for intermediate "struct hashmap_entry" pointers is a hard problem. So introduce "*_entry" APIs inspired by similar linked-list APIs in the Linux kernel. Unfortunately, `__typeof__' is not portable C, so we need an extra parameter to specify t