lawrence_danna marked 2 inline comments as done.
lawrence_danna added inline comments.
================
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();
----------------
labath wrote:
> 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).
wouldn't that result in an extra retain and release every time a PythonObject
was copied instead of referenced or moved?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69080/new/
https://reviews.llvm.org/D69080
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits