Skip to content

Commit 30ea4dd

Browse files
committed
idiomatic cleanup
[SVN r15032]
1 parent d5c33a2 commit 30ea4dd

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

test/defaults.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,19 @@ BOOST_PYTHON_MEM_FUN_GENERATOR(X_bar_stubs, bar, 1, 4)
9797

9898
BOOST_PYTHON_MODULE_INIT(defaults_ext)
9999
{
100-
module m("defaults_ext");
101-
m.def("foo", foo, foo_stubs());
102-
100+
module("defaults_ext")
101+
.def("foo", foo, foo_stubs())
102+
103103
#if !(defined(BOOST_MSVC) && (BOOST_MSVC <= 1200))
104-
m.def("bar", signature<object(*)(int, char, std::string, double)>(), bar_stubs());
105-
#else // signature does not work on VC6 only (VC is ok)
106-
m.def("bar", (object(*)(int, char, std::string, double))0, bar_stubs());
104+
.def("bar", signature<object(*)(int, char, std::string, double)>(), bar_stubs())
105+
#else // signature does not work on VC6 only (VC7 is ok)
106+
.def("bar", (object(*)(int, char, std::string, double))0, bar_stubs())
107107
#endif
108+
;
108109

109-
class_<X> xc("X");
110-
m.add(xc);
111-
112-
xc.def_init();
113-
xc.def("bar", &X::bar, X_bar_stubs());
110+
class_<X>("X")
111+
.def("bar", &X::bar, X_bar_stubs())
112+
;
114113
}
115114

116115
#include "module_tail.cpp"

0 commit comments

Comments
 (0)