Hacker News new | ask | show | jobs
by striking 3675 days ago
I recall seeing a coroutine library for C that did exactly this using preprocessor magic.

EDIT: /me sighs, this isn't the one I was looking for but it'll do for now. http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html / http://www.chiark.greenend.org.uk/~sgtatham/coroutines.h