Name: Anonymous 2012-01-25 2:28
thou shalt always accompany a call back with a void* argument that may be used arbitrarily by the caller:
and thou shalt have the satisfaction of passing a closure through the stack.
void kind_values(struct relation* self, char* key, void(*call_back)(void* userdata, char* value), void* userdata) {
for(char* value matching key in self) {
call_back(userdata, value);
}
}and thou shalt have the satisfaction of passing a closure through the stack.