attractivechaos/klib — pull request #17 by halfaleague (2013-05-29 19:07:01+00:00)
Title: Enable passing of named structs in functions

I wanted to pass around a list of vecs but gcc complains about anonymous structs.
Here is my solution, any thoughts?

Use kvec_init_t(type_name) to create a named struct.
Use kvec_type_t(type_name) as the type.

Example:

// make type
kvec_init_t(int, ints_vec)

int add_ints(kvec_type_t(ints_vec) *my_ints, int uport) {
// function body
}