Skip to content

Commit

Permalink
Minor iwyu fix, additional comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf W. Grosse-Kunstleve committed May 7, 2021
1 parent ad700fe commit 61e2ba7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/pybind11/detail/init.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ void setstate(value_and_holder &v_h, std::pair<T, O> &&result, bool need_alias)
auto d = handle(result.second);
if (PyDict_Check(d.ptr()) && PyDict_Size(d.ptr()) == 0) {
// Skipping setattr below, to not force use of py::dynamic_attr() for Class unnecessarily.
// See PR #2972 for details.
return;
}
setattr((PyObject *) v_h.inst, "__dict__", d);
Expand Down
1 change: 1 addition & 0 deletions tests/test_pickling_trampoline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "pybind11_tests.h"

#include <memory>
#include <stdexcept>
#include <utility>

namespace {
Expand Down

0 comments on commit 61e2ba7

Please sign in to comment.