[ccan] [PATCH 0/3] generators in C

David Gibson david at gibson.dropbear.id.au
Mon Feb 15 23:13:21 AEDT 2016


This series add's the 'generator' module which implements Python-like
generators in C.  By use of some extremely hairy macros, it's able to
have a surprisingly natural interface, even with arbitrary parameters
and return types.

David Gibson (3):
  configurator: Add test for ucontext.h
  generator: Generators for C
  generator: Allow generators to take arguments

 ccan/generator/LICENSE               |   1 +
 ccan/generator/_info                 |  72 +++++++++++
 ccan/generator/generator.c           |  54 ++++++++
 ccan/generator/generator.h           | 239 +++++++++++++++++++++++++++++++++++
 ccan/generator/test/api.c            |  98 ++++++++++++++
 ccan/generator/test/compile_fail-1.c |  21 +++
 ccan/generator/test/compile_fail-2.c |  21 +++
 ccan/generator/test/compile_fail-3.c |  24 ++++
 ccan/generator/test/compile_fail-4.c |  23 ++++
 ccan/generator/test/compile_fail-5.c |  21 +++
 ccan/generator/test/example-gens.c   |  28 ++++
 ccan/generator/test/example-gens.h   |  10 ++
 tools/configurator/configurator.c    |  46 +++++++
 13 files changed, 658 insertions(+)
 create mode 120000 ccan/generator/LICENSE
 create mode 100644 ccan/generator/_info
 create mode 100644 ccan/generator/generator.c
 create mode 100644 ccan/generator/generator.h
 create mode 100644 ccan/generator/test/api.c
 create mode 100644 ccan/generator/test/compile_fail-1.c
 create mode 100644 ccan/generator/test/compile_fail-2.c
 create mode 100644 ccan/generator/test/compile_fail-3.c
 create mode 100644 ccan/generator/test/compile_fail-4.c
 create mode 100644 ccan/generator/test/compile_fail-5.c
 create mode 100644 ccan/generator/test/example-gens.c
 create mode 100644 ccan/generator/test/example-gens.h

-- 
2.5.0



More information about the ccan mailing list