From 61e2ba76c40f5871196d071eebdf8d2c81a73fba Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 7 May 2021 15:00:55 -0700 Subject: [PATCH] Minor iwyu fix, additional comment. --- include/pybind11/detail/init.h | 1 + tests/test_pickling_trampoline.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/pybind11/detail/init.h b/include/pybind11/detail/init.h index c6b45a8c384..3269e04254a 100644 --- a/include/pybind11/detail/init.h +++ b/include/pybind11/detail/init.h @@ -296,6 +296,7 @@ void setstate(value_and_holder &v_h, std::pair &&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); diff --git a/tests/test_pickling_trampoline.cpp b/tests/test_pickling_trampoline.cpp index e5bd29be58e..b02a9a99171 100644 --- a/tests/test_pickling_trampoline.cpp +++ b/tests/test_pickling_trampoline.cpp @@ -5,6 +5,7 @@ #include "pybind11_tests.h" #include +#include #include namespace {