From: Shinichiro Hamaji Date: Wed, 9 Aug 2017 06:04:26 +0000 (+0900) Subject: Merge pull request #224 from jray272/run-windows-script X-Git-Tag: accepted/tizen/5.0/unified/20181102.024921~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e209906823b9144e955f9e01fedd90281c6d54c8;hp=b3695ee3256d371219a00e39cdd7e5e33a4a0214;p=platform%2Fupstream%2Fglog.git Merge pull request #224 from jray272/run-windows-script Run src/windows/preprocess.sh to pick up latest logging.h.in changes --- diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 70ddbec..7130683 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -31,6 +31,7 @@ Fumitoshi Ukai Guillaume Dumont HÃ¥kan L. S. Younes Ivan Penkov +Jim Ray Michael Tanner MiniLight Peter Collingbourne diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h index f521a2b..e72c088 100755 --- a/src/windows/glog/logging.h +++ b/src/windows/glog/logging.h @@ -1117,6 +1117,12 @@ class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf { LogStreamBuf(char *buf, int len) { setp(buf, buf + len - 2); } + + // Resets the buffer. Useful if we reuse it by means of TLS. + void reset() { + setp(pbase(), epptr()); + } + // This effectively ignores overflow. virtual int_type overflow(int_type ch) { return ch; @@ -1179,6 +1185,7 @@ public: size_t pcount() const { return streambuf_.pcount(); } char* pbase() const { return streambuf_.pbase(); } char* str() const { return pbase(); } + void reset() { streambuf_.reset(); } private: LogStream(const LogStream&);