]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/PyModules: move constructor definition to .cc
authorDan Mick <dan.mick@redhat.com>
Tue, 2 May 2017 23:55:21 +0000 (16:55 -0700)
committerDan Mick <dan.mick@redhat.com>
Fri, 19 May 2017 05:09:08 +0000 (22:09 -0700)
Otherwise, the incomplete ServeThread type causes problems
for others who include PyModules.h

Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/mgr/PyModules.cc

index 89347e2326b1766668ca8115cde4313d8fa5b128..8b0fc62d373f99bb6fd0973a4bf28aaa6c09d673 100644 (file)
@@ -60,16 +60,17 @@ namespace {
 #undef dout_prefix
 #define dout_prefix *_dout << "mgr " << __func__ << " "
 
-PyModules::PyModules(DaemonStateIndex &ds, ClusterState &cs, MonClient &mc,
-                     Objecter &objecter_, Client &client_,
-                    Finisher &f)
+// constructor/destructor implementations cannot be in .h,
+// because ServeThread is still an "incomplete" type there
+
+PyModules::PyModules(DaemonStateIndex &ds, ClusterState &cs,
+         MonClient &mc, Objecter &objecter_, Client &client_,
+         Finisher &f)
   : daemon_state(ds), cluster_state(cs), monc(mc),
-    objecter(objecter_), client(client_),
-    finisher(f)
+    objecter(objecter_), client(client_), finisher(f),
+    lock("PyModules")
 {}
 
-// we can not have the default destructor in header, because ServeThread is
-// still an "incomplete" type. so we need to define the destructor here.
 PyModules::~PyModules() = default;
 
 void PyModules::dump_server(const std::string &hostname,