[Lldb-commits] [lldb] r333478 - [LLDB] Revert r303907.
Tim Shen via lldb-commits
lldb-commits at lists.llvm.org
Tue May 29 16:27:26 PDT 2018
Author: timshen
Date: Tue May 29 16:27:26 2018
New Revision: 333478
URL: http://llvm.org/viewvc/llvm-project?rev=333478&view=rev
Log:
[LLDB] Revert r303907.
See https://reviews.llvm.org/rL303907 for details about the bug.
Modified:
lldb/trunk/include/lldb/Host/Editline.h
lldb/trunk/source/Host/common/Editline.cpp
Modified: lldb/trunk/include/lldb/Host/Editline.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Editline.h?rev=333478&r1=333477&r2=333478&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Editline.h (original)
+++ lldb/trunk/include/lldb/Host/Editline.h Tue May 29 16:27:26 2018
@@ -81,14 +81,8 @@ using EditLineStringStreamType = std::st
using EditLineCharType = char;
#endif
-#ifdef EL_CLIENTDATA /* editline with wide support + wide char read function */
-using EditLineGetCharType = wchar_t;
-#else
-using EditLineGetCharType = char;
-#endif
-
typedef int (*EditlineGetCharCallbackType)(::EditLine *editline,
- EditLineGetCharType *c);
+ EditLineCharType *c);
typedef unsigned char (*EditlineCommandCallbackType)(::EditLine *editline,
int ch);
typedef const char *(*EditlinePromptCallbackType)(::EditLine *editline);
@@ -275,7 +269,7 @@ private:
/// Character reading implementation for EditLine that supports our multi-line
/// editing trickery.
- int GetCharacter(EditLineGetCharType *c);
+ int GetCharacter(EditLineCharType *c);
/// Prompt implementation for EditLine.
const char *Prompt();
@@ -328,7 +322,7 @@ private:
/// single or multi-line editing.
void ConfigureEditor(bool multiline);
- bool CompleteCharacter(char ch, EditLineGetCharType &out);
+ bool CompleteCharacter(char ch, EditLineCharType &out);
private:
#if LLDB_EDITLINE_USE_WCHAR
Modified: lldb/trunk/source/Host/common/Editline.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Editline.cpp?rev=333478&r1=333477&r2=333478&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Editline.cpp (original)
+++ lldb/trunk/source/Host/common/Editline.cpp Tue May 29 16:27:26 2018
@@ -467,7 +467,7 @@ unsigned char Editline::RecallHistory(bo
return CC_NEWLINE;
}
-int Editline::GetCharacter(EditLineGetCharType *c) {
+int Editline::GetCharacter(EditLineCharType *c) {
const LineInfoW *info = el_wline(m_editline);
// Paint a faint version of the desired prompt over the version libedit draws
@@ -961,7 +961,7 @@ void Editline::ConfigureEditor(bool mult
}));
el_wset(m_editline, EL_GETCFN, (EditlineGetCharCallbackType)([](
- EditLine *editline, EditLineGetCharType *c) {
+ EditLine *editline, EditLineCharType *c) {
return Editline::InstanceFor(editline)->GetCharacter(c);
}));
@@ -1350,12 +1350,12 @@ void Editline::PrintAsync(Stream *stream
}
}
-bool Editline::CompleteCharacter(char ch, EditLineGetCharType &out) {
+bool Editline::CompleteCharacter(char ch, EditLineCharType &out) {
#if !LLDB_EDITLINE_USE_WCHAR
if (ch == (char)EOF)
return false;
- out = (unsigned char)ch;
+ out = ch;
return true;
#else
std::codecvt_utf8<wchar_t> cvt;
More information about the lldb-commits
mailing list