mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Try to avoid duplicate declarations for profile macros
We can use the __COUNTER__ macro or, failing that, the __LINE__ macro to ensure that we don't declare dummy variables more than once with the same name.
This commit is contained in:
parent
9bc8c05db8
commit
e3aea910b1
@ -51,8 +51,13 @@ void _clutter_profile_resume (void);
|
||||
|
||||
#else /* CLUTTER_ENABLE_PROFILE */
|
||||
|
||||
#define CLUTTER_STATIC_TIMER(A,B,C,D,E) extern void _clutter_dummy_decl (void)
|
||||
#define CLUTTER_STATIC_COUNTER(A,B,C,D) extern void _clutter_dummy_decl (void)
|
||||
#ifdef __COUNTER__
|
||||
#define CLUTTER_STATIC_TIMER(A,B,C,D,E) extern void G_PASTE (_clutter_dummy_decl, __COUNTER__) (void)
|
||||
#define CLUTTER_STATIC_COUNTER(A,B,C,D) extern void G_PASTE (_clutter_dummy_decl, __COUNTER__) (void)
|
||||
#else
|
||||
#define CLUTTER_STATIC_TIMER(A,B,C,D,E) extern void G_PASTE (_clutter_dummy_decl, __LINE__) (void)
|
||||
#define CLUTTER_STATIC_TIMER(A,B,C,D,E) extern void G_PASTE (_clutter_dummy_decl, __LINE__) (void)
|
||||
#endif
|
||||
#define CLUTTER_COUNTER_INC(A,B) G_STMT_START { } G_STMT_END
|
||||
#define CLUTTER_COUNTER_DEC(A,B) G_STMT_START { } G_STMT_END
|
||||
#define CLUTTER_TIMER_START(A,B) G_STMT_START { } G_STMT_END
|
||||
|
Loading…
Reference in New Issue
Block a user