2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 18:12:43 +00:00

fix bugs in example code

[SVN r31305]
This commit is contained in:
Eric Niebler
2005-10-12 20:17:28 +00:00
parent 1cec514b39
commit 2974286209

View File

@@ -121,13 +121,14 @@ scope();
<p>C++ Module definition:</p>
<pre>
#include &lt;boost/python/module.hpp&gt;
#include &lt;boost/python/class.hpp&gt;
#include &lt;boost/python/scope.hpp&gt;
using namespace boost::python;
struct X
{
void f();
void f() {}
struct Y { int g() { return 42; } };
};
@@ -145,8 +146,8 @@ BOOST_PYTHON_MODULE(nested)
;
// Define a class Y in the current scope, X
class_&lt;Y&gt;("Y")
.def("g", &amp;Y::g)
class_&lt;X::Y&gt;("Y")
.def("g", &amp;X::Y::g)
;
}
</pre>