Skip to content

Commit

Permalink
add macro for checking if the current function will output debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Matthew committed Jan 28, 2015
1 parent c842838 commit 32d9e53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rb-debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ G_BEGIN_DECLS

#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define rb_debug(...) rb_debug_realf (__func__, __FILE__, __LINE__, TRUE, __VA_ARGS__)
#define rb_debug_here() rb_debug_matches (__func__, __FILE__)
#elif defined(__GNUC__) && __GNUC__ >= 3
#define rb_debug(...) rb_debug_realf (__FUNCTION__, __FILE__, __LINE__, TRUE, __VA_ARGS__)
#define rb_debug_here() rb_debug_matches (__FUNCTION__, __FILE__)
#else
#define rb_debug
#endif
Expand Down

0 comments on commit 32d9e53

Please sign in to comment.