GeezerVison is showing github.com — idiomatic cleanup · boostorg/python@30ea4dd
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/defaults.cpp +10-11Lines changed: 10 additions & 11 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -97,20 +97,19 @@ BOOST_PYTHON_MEM_FUN_GENERATOR(X_bar_stubs, bar, 1, 4) | 97 | 97 |
| 98 | 98 | BOOST_PYTHON_MODULE_INIT(defaults_ext) | 99 | 99 | { | 100 | | - module m("defaults_ext"); | 101 | | - m.def("foo", foo, foo_stubs()); | 102 | | - | | 100 | + module("defaults_ext") | | 101 | + .def("foo", foo, foo_stubs()) | | 102 | + | 103 | 103 | #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()) | 107 | 107 | #endif | | 108 | + ; | 108 | 109 |
| 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 | + ; | 114 | 113 | } | 115 | 114 |
| 116 | 115 | #include "module_tail.cpp" |
|