Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf/dist/atf-c++/detail It is unclear whether c...
details: https://anonhg.NetBSD.org/src/rev/0e8a8dd8a9f4
branches: trunk
changeset: 786499:0e8a8dd8a9f4
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Apr 30 00:31:56 2013 +0000
description:
It is unclear whether cin is guaranteed to buffer the last input
character of a get() for ungetch() to work. Prefer putback() to make it
work with current implementations of cin in libc++. Tracked as
http://llvm.org/bugs/show_bug.cgi?id=15867 with test case.
diffstat:
external/bsd/atf/dist/atf-c++/detail/parser.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r e3bb414d340d -r 0e8a8dd8a9f4 external/bsd/atf/dist/atf-c++/detail/parser.hpp
--- a/external/bsd/atf/dist/atf-c++/detail/parser.hpp Tue Apr 30 00:29:19 2013 +0000
+++ b/external/bsd/atf/dist/atf-c++/detail/parser.hpp Tue Apr 30 00:31:56 2013 +0000
@@ -259,7 +259,7 @@
t = token(m_lineno, m_text_type, text);
quoted = true;
} else {
- m_is.unget();
+ m_is.putback(ch);
done = true;
}
} else {
@@ -271,13 +271,13 @@
t = token(m_lineno, (*idelim).second,
std::string("") + ch);
else
- m_is.unget();
+ m_is.putback(ch);
} else if (ch == '\n') {
done = true;
if (text.empty())
t = token(m_lineno, m_nl_type, "<<NEWLINE>>");
else
- m_is.unget();
+ m_is.putback(ch);
} else if (m_skipws && (ch == ' ' || ch == '\t')) {
if (!text.empty())
done = true;
Home |
Main Index |
Thread Index |
Old Index