Fixed typo & added pointer cast for explicit comparison in section entry iterations
This commit is contained in:
parent
0d7033cfd5
commit
2fcb89c7ef
3 changed files with 7 additions and 7 deletions
|
@ -56,8 +56,8 @@ bool is_current_process(s_proc_handle *proc);
|
|||
# ifdef VANILLA_WIN32
|
||||
void *get_win_section_start(const char *section);
|
||||
void *get_win_section_end(const char *section);
|
||||
# define GET_SECTION_START(Name) get_win_section_start(Name)
|
||||
# define GET_SECTION_END(Name) get_win_section_end(Name)
|
||||
# define GET_SECTION_START(Name) get_win_section_start(#Name)
|
||||
# define GET_SECTION_END(Name) get_win_section_end(#Name)
|
||||
# else
|
||||
# define GET_SECTION_START(Name) SECTION_START(Name)
|
||||
# define GET_SECTION_END(Name) SECTION_END(Name)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
IMPL_SECTION_LIMITS(f_report_hook, crit_ ## Kind); \
|
||||
void call_report_hooks_##Kind(void *data) { \
|
||||
for (f_report_hook *hook = GET_SECTION_START(crit_ ## Kind); \
|
||||
hook < GET_SECTION_END(crit_ ## Kind); \
|
||||
hook < (f_report_hook*) GET_SECTION_END(crit_ ## Kind); \
|
||||
++hook) { \
|
||||
(*hook)(data); \
|
||||
} \
|
||||
|
|
|
@ -32,14 +32,14 @@ DECL_SECTION_LIMITS(struct criterion_suite, crit_suites);
|
|||
|
||||
struct criterion_test_set *criterion_init(void);
|
||||
|
||||
# define FOREACH_TEST_SEC(Test) \
|
||||
for (struct criterion_test *Test = GET_SECTION_START(criterion_tests); \
|
||||
Test < GET_SECTION_END(criterion_tests); \
|
||||
# define FOREACH_TEST_SEC(Test) \
|
||||
for (struct criterion_test *Test = GET_SECTION_START(criterion_tests); \
|
||||
Test < (struct criterion_test*) GET_SECTION_END(criterion_tests); \
|
||||
++Test)
|
||||
|
||||
# define FOREACH_SUITE_SEC(Suite) \
|
||||
for (struct criterion_suite *Suite = GET_SECTION_START(crit_suites); \
|
||||
Suite < GET_SECTION_END(crit_suites); \
|
||||
Suite < (struct criterion_suite*) GET_SECTION_END(crit_suites); \
|
||||
++Suite)
|
||||
|
||||
#endif /* !CRITERION_RUNNER_H_ */
|
||||
|
|
Loading…
Add table
Reference in a new issue