Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 38a6de0fe3 Bug 1369622 - Fix MOZ_FOR_EACH with an empty list. r=froydnj
I'm not sure how I tested MOZ_FOR_EACH in bug 1368932, but it turns out
it doesn't work with an empty list, despite
MOZ_PASTE_PREFIX_AND_ARG_COUNT now supporting 0 arguments.

Macros can be tricky, and it ends up being easier to make things work
cross-compiler with a separate macro that does the counting, and
(re)building MOZ_PASTE_PREFIX_AND_ARG_COUNT on top of that. Then
MOZ_FOR_EACH ends up working as expected with an empty list.

So this adds a MOZ_ARG_COUNT macro that counts the number of variadic
arguments it's given, and derives MOZ_PASTE_PREFIX_AND_ARG_COUNT from
it.

And this adds a testcase validating that MOZ_FOR_EACH works properly
with an empty list as a result.

--HG--
extra : rebase_source : 309371d87bd1561fbd2153f44fc1256185045d23
2017-06-02 14:53:54 +09:00
Xidorn Quan b7ebe87cdc Bug 1345074 - Add MOZ_FOR_EACH_SEPARATED which adds separator between items. r=Waldo
MozReview-Commit-ID: IWqs17MLhHD

--HG--
extra : rebase_source : adc004b185501c9fe8109589fb671cd5a6551002
2017-03-07 22:28:49 +11:00
Nicholas Nethercote 6c3f5d7b8e Bug 1041914 - Convert the fourth quarter of MFBT to Gecko style. r=Ms2ger.
--HG--
extra : rebase_source : 588fa9c0d1e819e1826835c4ef4a1428a927bf93
2014-07-22 20:54:41 -07:00
Birunthan Mohanathas 772debb89d Bug 989460 - Part 2: Add MOZ_FOR_EACH macro. r=Waldo 2014-04-24 10:49:00 +02:00