nealsid accepted this revision. nealsid added inline comments. This revision is now accepted and ready to land.
================ Comment at: include/lldb/Host/Editline.h:187 + /// Register a callback to retrieve the prompt. + void SetPromptCallback(PromptCallbackType callback, void *baton); + ---------------- zturner wrote: > I'd love to stop using the `baton` idiom if possible. can you make this > function take an `llvm::function_ref<StringRef (EditLine*)>` instead? Then, > in the class, store a `std::function<StringRef (EditLine*)>`. When you call > `SetPromptCallback`, write `SetPromptCallback([this](EditLine* L) { return > this->PromptCallback(L); });` Sounds good to me. I'll split up the changes and sent a patch that migrates to std::function & removes baton from all callbacks in Editline first and then rebase this one on top of that. Repository: rL LLVM https://reviews.llvm.org/D49963 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits