GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — idiomatic cleanup · boostorg/python@30ea4dd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • defaults.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/defaults.cpp‎

Copy file name to clipboardExpand all lines: test/defaults.cpp
+10-11Lines 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 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.