Michael> Maybe its a naming thing? We can call the list Michael> "iterator", does this make it less ugly?
I thought about this, but it feels like overkill for something pretty simple. So how about just doing /* put list of devices in list and return length of list */ extern int ibv_get_device_list(struct ibv_device * const **list); /* free a list of devices from ibv_get_device_list */ extern void ibv_free_device_list(struct ibv_device * const *list); which could be used as: struct ibv_device * const *list; int list_len; list_len = ibv_get_device_list(&list); /* ... */ ibv_free_device_list(list); Or are the consts too confusing? Should we be a little less safe but make it nice and simple and just do extern int ibv_get_device_list(struct ibv_device ***list); and so on? - R. _______________________________________________ openib-general mailing list openib-general@openib.org http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general