Commit 688bf4ce by Calvin Buckley

Remove macro magic

parent 950a7f76
...@@ -47,15 +47,6 @@ GIT_INLINE(void) git_trace__write_fmt( ...@@ -47,15 +47,6 @@ GIT_INLINE(void) git_trace__write_fmt(
} }
#define git_trace_level() (git_trace__data.level) #define git_trace_level() (git_trace__data.level)
/* Varadic macros are a C99 feature */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define git_trace(l, ...) { \
if (git_trace__data.level >= l && \
git_trace__data.callback != NULL) { \
git_trace__write_fmt(l, __VA_ARGS__); \
} \
}
#else
GIT_INLINE(void) git_trace(git_trace_level_t level, const char *fmt, ...) GIT_INLINE(void) git_trace(git_trace_level_t level, const char *fmt, ...)
{ {
if (git_trace__data.level >= level && if (git_trace__data.level >= level &&
...@@ -67,7 +58,6 @@ GIT_INLINE(void) git_trace(git_trace_level_t level, const char *fmt, ...) ...@@ -67,7 +58,6 @@ GIT_INLINE(void) git_trace(git_trace_level_t level, const char *fmt, ...)
va_end(ap); va_end(ap);
} }
} }
#endif
#else #else
GIT_INLINE(void) git_trace__null( GIT_INLINE(void) git_trace__null(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment