]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: only include necessary headers
authorKefu Chai <kchai@redhat.com>
Mon, 16 Nov 2020 08:16:38 +0000 (16:16 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 16 Nov 2020 08:37:17 +0000 (16:37 +0800)
for two reasons:

* faster compilation with less source files to process
* avoid including "boost/detail/iterator.hpp", so we can
  silence the warning like:

boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is
deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/PyModule.cc

index 365c3e3cd9bbcd5a1c8139cd9e696e619d0b5cc3..07461af3b887c52d11a0101b0f09e95367470fa7 100644 (file)
@@ -34,7 +34,9 @@ std::string PyModule::config_prefix = "mgr/";
 #define BOOST_BIND_GLOBAL_PLACEHOLDERS
 // Boost apparently can't be bothered to fix its own usage of its own
 // deprecated features.
-#include <boost/python.hpp>
+#include <boost/python/extract.hpp>
+#include <boost/python/import.hpp>
+#include <boost/python/object.hpp>
 #undef BOOST_BIND_GLOBAL_PLACEHOLDERS
 #include <boost/algorithm/string/predicate.hpp>
 #include "include/ceph_assert.h"  // boost clobbers this