(svn r12685) -Codechange: DebugDumpCommands() couldn't be inlined, define it as a macro instead
authorsmatz
Sun, 13 Apr 2008 14:19:08 +0000
changeset 8915 ea2b40b02844
parent 8914 6bbc5f1455f7
child 8916 bd6e75b4381d
(svn r12685) -Codechange: DebugDumpCommands() couldn't be inlined, define it as a macro instead
src/debug.h
--- a/src/debug.h	Sun Apr 13 11:35:57 2008 +0000
+++ b/src/debug.h	Sun Apr 13 14:19:08 2008 +0000
@@ -103,7 +103,13 @@
 #ifdef DEBUG_DUMP_COMMANDS
 	void CDECL DebugDumpCommands(const char *s, ...);
 #else /* DEBUG_DUMP_COMMANDS */
-	static inline void DebugDumpCommands(const char *s, ...) {}
+	/* when defined as an empty function with variable argument list,
+	 * it can't be inlined - so define it as an empty macro */
+	#if defined(__GNUC__) && (__GNUC__ < 3)
+		#define DebugDumpCommands(s, args...)
+	#else
+		#define DebugDumpCommands(s, ...)
+	#endif
 #endif /* DEBUG_DUMP_COMMANDS */
 
 #endif /* DEBUG_H */