Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You have to pass the field name too ("node").


Not really. If you only want to manipulate the list, you only need a direct pointer to the nested node but don't need to know the 'outer type'.

Only if the function takes a pointer to the outer type it needs to know how to get the pointer to the embedded node struct from the item pointer.

...I guess it makes a lot more sense if you ever wrote code for AmigaOS ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: