|
Last change
on this file since 47 was
29,
checked in by landauf, 17 years ago
|
|
updated boost from 1_33_1 to 1_34_1
|
|
File size:
678 bytes
|
| Line | |
|---|
| 1 | // Copyright David Abrahams 2004. Distributed under the Boost |
|---|
| 2 | // Software License, Version 1.0. (See accompanying |
|---|
| 3 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
|---|
| 4 | #include <boost/python/module.hpp> |
|---|
| 5 | #include <boost/python/def.hpp> |
|---|
| 6 | #include <boost/python/class.hpp> |
|---|
| 7 | |
|---|
| 8 | struct C {}; |
|---|
| 9 | |
|---|
| 10 | struct D {}; |
|---|
| 11 | |
|---|
| 12 | struct E |
|---|
| 13 | { |
|---|
| 14 | const D fe (const C&) {return D();} |
|---|
| 15 | const D fe2(const C&, const C&) {return D();} |
|---|
| 16 | }; |
|---|
| 17 | |
|---|
| 18 | BOOST_PYTHON_MODULE(bienstman2_ext) |
|---|
| 19 | { |
|---|
| 20 | using namespace boost::python; |
|---|
| 21 | |
|---|
| 22 | class_<C>("C"); |
|---|
| 23 | class_<D>("D"); |
|---|
| 24 | class_<E>("E") |
|---|
| 25 | .def("fe", &E::fe) // this compiles. |
|---|
| 26 | .def("fe2", &E::fe2) // this doesn't... well, now it does ;-) |
|---|
| 27 | ; |
|---|
| 28 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.