[Lldb-commits] [PATCH] D69080: eliminate one form of PythonObject::Reset()
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 17 01:44:11 PDT 2019
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
I like where this is going.
================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:235-245
PythonObject &operator=(const PythonObject &other) {
Reset(PyRefType::Borrowed, other.get());
return *this;
}
- void Reset(PythonObject &&other) {
+ PythonObject &operator=(PythonObject &&other) {
Reset();
----------------
You can consider simplifying this further down to a "universal"/"sink" `operator=(PythonObject other)`. Since the object is really just a pointer, the extra object being created won't hurt (in fact, the removal of `&`-indirection might make things faster).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69080/new/
https://reviews.llvm.org/D69080
More information about the lldb-commits
mailing list