diff --git a/.travis.yml b/.travis.yml index d76208f5..ca2d3b7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,9 @@ os: - osx install: - - wget 'https://googletest.googlecode.com/files/gtest-1.7.0.zip' - - unzip gtest-1.7.0.zip - - ln -s gtest-1.7.0 gtest + - git clone --branch release-1.7.0 --depth 1 https://github.com/google/googletest.git gtest + - touch gtest/build-aux/config.h.in + - cd gtest && ../autogen.sh && cd .. - sudo pip install BeautifulSoup - sudo pip install html5lib==0.95 diff --git a/src/util.c b/src/util.c index 5a24c115..061d6f3c 100644 --- a/src/util.c +++ b/src/util.c @@ -44,15 +44,3 @@ char* gumbo_copy_stringz(GumboParser* parser, const char* str) { strcpy(buffer, str); return buffer; } - -// Debug function to trace operation of the parser. Pass --copts=-DGUMBO_DEBUG -// to use. -void gumbo_debug(const char* format, ...) { -#ifdef GUMBO_DEBUG - va_list args; - va_start(args, format); - vprintf(format, args); - va_end(args); - fflush(stdout); -#endif -} diff --git a/src/util.h b/src/util.h index 6ad65649..0e84fe91 100644 --- a/src/util.h +++ b/src/util.h @@ -51,7 +51,17 @@ void gumbo_parser_deallocate(struct GumboInternalParser* parser, void* ptr); // Debug wrapper for printf, to make it easier to turn off debugging info when // required. -void gumbo_debug(const char* format, ...); +// Debug function to trace operation of the parser. Pass --copts=-DGUMBO_DEBUG +// to use. +void inline gumbo_debug(const char* format, ...) { +#ifdef GUMBO_DEBUG + va_list args; + va_start(args, format); + vprintf(format, args); + va_end(args); + fflush(stdout); +#endif +} #ifdef __cplusplus }