]> git.ozlabs.org Git - ccan/commitdiff
generator: Allow generators to take arguments
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 12 Feb 2016 12:49:49 +0000 (23:49 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 25 Feb 2016 11:07:20 +0000 (22:07 +1100)
Using some serious macro magic, this patch extends generators to allow
them to take arbitrary arguments.  The arguments are marshalled into a
structure placed at the far end of the generator's stack when it is
created.  Then, they're unmarshalled back into C parameters when we first
context switch into the generator.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

No differences found