<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/u-boot/variadic-macro.h, branch v2018.03</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>include: Add a variadic macro to call a callback for all arguments</title>
<updated>2017-10-03T01:52:16+00:00</updated>
<author>
<name>Marek Behún</name>
<email>marek.behun@nic.cz</email>
</author>
<published>2017-09-03T15:00:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=59981e6a3d6074bf5413c1875a95325a4b8c01ca'/>
<id>59981e6a3d6074bf5413c1875a95325a4b8c01ca</id>
<content type='text'>
Add a header variadic-macro.h which defines the CALL_MACRO_FOR_EACH marco.

This macro can be used as follows:
  #define TEST(x)
  CALL_MACRO_FOR_EACH(TEST, a, b, c, d)

This will expand to
  TEST(a) TEST(b) TEST(c) TEST(d)

The nice thing is that CALL_MACRO_FOR_EACH is a variadic macro, thus the
number of arguments can vary (although it has an upper limit - in this
implementation 32 arguments).

Signed-off-by: Marek Behun &lt;marek.behun@nic.cz&gt;

 create mode 100644 include/u-boot/variadic-macro.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a header variadic-macro.h which defines the CALL_MACRO_FOR_EACH marco.

This macro can be used as follows:
  #define TEST(x)
  CALL_MACRO_FOR_EACH(TEST, a, b, c, d)

This will expand to
  TEST(a) TEST(b) TEST(c) TEST(d)

The nice thing is that CALL_MACRO_FOR_EACH is a variadic macro, thus the
number of arguments can vary (although it has an upper limit - in this
implementation 32 arguments).

Signed-off-by: Marek Behun &lt;marek.behun@nic.cz&gt;

 create mode 100644 include/u-boot/variadic-macro.h
</pre>
</div>
</content>
</entry>
</feed>
