From 2974286209654c5121dd1d7a2f0667cd95d5b601 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Wed, 12 Oct 2005 20:17:28 +0000 Subject: [PATCH] fix bugs in example code [SVN r31305] --- doc/v2/scope.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/v2/scope.html b/doc/v2/scope.html index e158ddcb..4ec7e5a1 100644 --- a/doc/v2/scope.html +++ b/doc/v2/scope.html @@ -121,13 +121,14 @@ scope();

C++ Module definition:

+#include <boost/python/module.hpp>
 #include <boost/python/class.hpp>
 #include <boost/python/scope.hpp>
 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_<Y>("Y")
-      .def("g", &Y::g)
+   class_<X::Y>("Y")
+      .def("g", &X::Y::g)
       ;
 }