diff --git a/modules/base/pymod/export_logger.cc b/modules/base/pymod/export_logger.cc index 91baeaea09d1681291592b39ecbc104f5f991d8d..4aa1dadc8a8e36a41d3cf95e66abe17eff23ec02 100644 --- a/modules/base/pymod/export_logger.cc +++ b/modules/base/pymod/export_logger.cc @@ -25,9 +25,6 @@ using namespace boost::python; using namespace ost; - -namespace { - struct WrappedLogSink : public LogSink { WrappedLogSink(PyObject* self): self_(self) { } @@ -88,7 +85,6 @@ void reset_sinks() { Logger::Instance().ResetSinks(); } -} void export_Logger() { diff --git a/modules/base/pymod/export_units.cc b/modules/base/pymod/export_units.cc index 1a50040f4ce41877e4cdf52faca60f1e81372553..80fa61862bd49513f2dfcc69013477479d07c59a 100644 --- a/modules/base/pymod/export_units.cc +++ b/modules/base/pymod/export_units.cc @@ -30,8 +30,7 @@ using namespace ost; #ifdef OST_STATIC_PROPERTY_WORKAROUND -namespace { - struct Units_ { +struct Units_ { Real get_m() { return Units::m; } Real get_mm() { return Units::mm; } Real get_nm() { return Units::nm; } @@ -53,9 +52,8 @@ namespace { Real get_kDa() { return Units::kDa; } Real get_Da() { return Units::Da; } Real get_C() { return Units::C; } - }; +}; -} //ns #endif diff --git a/modules/geom/pymod/wrap_geom.cc b/modules/geom/pymod/wrap_geom.cc index 3c61a57c8b911c6b0a063c8bfedc258529a23011..76bb7930057165463a426f60e133f15314b00618 100644 --- a/modules/geom/pymod/wrap_geom.cc +++ b/modules/geom/pymod/wrap_geom.cc @@ -36,12 +36,12 @@ extern void export_Composite2_op(); extern void export_Composite3_op(); extern void export_Quat(); -namespace { +namespace details { #if (defined(OST_STATIC_PROPERTY_WORKAROUND)) struct Axis_ { - int X() const { return geom::Axis::X; } - int Y() const { return geom::Axis::Y; } - int Z() const { return geom::Axis::Z; } + int X() { return geom::Axis::X; } + int Y() { return geom::Axis::Y; } + int Z() { return geom::Axis::Z; } }; #else struct Axis_ {}; @@ -67,17 +67,17 @@ BOOST_PYTHON_MODULE(_ost_geom) #if (defined(OST_STATIC_PROPERTY_WORKAROUND)) // workaround for a problem with boost python and python 2.6.3/4 - object axis=class_<Axis_>("Axis_") - .add_property("X", &Axis_::X) - .add_property("Y", &Axis_::Y) - .add_property("Z", &Axis_::Z) + class_<details::Axis_> axis("Axis_"); + axis.add_property("X", &details::Axis_::X); + axis.add_property("Y", &details::Axis_::Y); + axis.add_property("Z", &details::Axis_::Z); ; scope().attr("Axis")=axis(); #else - class_<Axis_>("Axis") - .def_readonly("X",geom::Axis::X) - .def_readonly("Y",geom::Axis::Y) - .def_readonly("Z",geom::Axis::Z) + class_<details::Axis_>("Axis") + .def_readonly("X", geom::Axis::X) + .def_readonly("Y", geom::Axis::Y) + .def_readonly("Z", geom::Axis::Z) ; #endif } diff --git a/modules/info/pymod/wrap_info.cc b/modules/info/pymod/wrap_info.cc index 223dbe1a9cfd8bd79ada7978aa6cf6a94e1b6225..14eeffb63606efd04b1d17bea4e608e0ca1aa6ba 100644 --- a/modules/info/pymod/wrap_info.cc +++ b/modules/info/pymod/wrap_info.cc @@ -34,8 +34,6 @@ using namespace boost::python; using namespace ost; using namespace ost::info; -namespace { - InfoHandle (*CreateInfoPtr1)()=CreateInfo; InfoHandle (*CreateInfoPtr2)(const String&)=CreateInfo; @@ -154,7 +152,6 @@ InfoItem (InfoGroup::*create_item_b)(const String&, int)=&InfoGroup::CreateItem; InfoItem (InfoGroup::*create_item_c)(const String&, bool)=&InfoGroup::CreateItem; InfoItem (InfoGroup::*create_item_d)(const String&, Real)=&InfoGroup::CreateItem; -} BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(getgroup_overloads, GetGroup, 1, 2) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(retrievegroup_overloads, RetrieveGroup, 1, 2) diff --git a/modules/mol/base/pymod/export_visitor.cc b/modules/mol/base/pymod/export_visitor.cc index 0def51e95380ce057536b3de2395474f2cc84bb8..3a6d1e3285153e2bc71ff09f562d4e2e18b3645e 100644 --- a/modules/mol/base/pymod/export_visitor.cc +++ b/modules/mol/base/pymod/export_visitor.cc @@ -23,8 +23,6 @@ using namespace boost::python; using namespace ost; using namespace ost::mol; -namespace { - struct WrappedVisitor : EntityVisitor { WrappedVisitor(PyObject *p) @@ -63,7 +61,6 @@ struct WrappedVisitor : EntityVisitor PyObject* self; }; -} void export_Visitor() { class_<EntityVisitor, WrappedVisitor>("EntityVisitor", init<>()) diff --git a/modules/seq/base/pymod/export_sequence.cc b/modules/seq/base/pymod/export_sequence.cc index 38a0e34ff3c211e649294c2d4f72b05b8f06e429..407633775e07924713162f7a7034d97358eb3584 100644 --- a/modules/seq/base/pymod/export_sequence.cc +++ b/modules/seq/base/pymod/export_sequence.cc @@ -38,7 +38,6 @@ using namespace ost; using namespace ost::seq; using namespace boost::python; -namespace { void (SequenceHandle::*attach_one)(const mol::EntityView&)=&SequenceHandle::AttachView; void (SequenceHandle::*attach_two)(const mol::EntityView&, @@ -276,7 +275,6 @@ void const_seq_handle_def(O& bp_class) ; } -} void export_sequence() {