zeromq/czmq — pull request #686 by mrvn (2014-09-26 14:57:53+00:00)
Title: Pull ziflist simple list

!!! Please read the patch before merging !!!

It seemed to me that it makes more sense for ziflist to have a single list of interface structures instead of one list per interface attribute. But then a ziflist_t contains just a single zlist_t and I didn't want to allocate a structure with just a zlist_t pointer. Seems kind of silly. Why not use the zlist_t pointer directly?

I tried doing "typedef zlist_t _ziflist_t;" but that doesn't quite seem to work. I get type conflicts because a ziflist_t ** is used but a zlist_t ** expected and such. The typedef should make them identical but gcc doesn't seem to agree with me.

So for now I declared "struct _ziflist_t;" abstract and cast it to and from zlist_t. I don't like that.

Any idea how to get a simple typedef working? If not then I guess a "struct _ziflist_t { zlist_t *list; };" will give nicer code.