|
8 | 8 |
|
9 | 9 | # include <boost/python/errors.hpp> |
10 | 10 | # include <boost/python/detail/config.hpp> |
11 | | -# include <boost/python/reference.hpp> |
12 | 11 | # include <boost/python/make_function.hpp> |
13 | 12 | # include <boost/python/objects.hpp> |
14 | | -# include <boost/python/detail/wrap_python.hpp> |
15 | 13 | # include <boost/python/class_fwd.hpp> |
| 14 | +# include <boost/python/detail/module_base.hpp> |
16 | 15 |
|
17 | 16 | namespace boost { namespace python { |
18 | 17 |
|
19 | | -class BOOST_PYTHON_DECL module_base |
20 | | -{ |
21 | | - public: |
22 | | - // Create a module. REQUIRES: only one module is created per module. |
23 | | - module_base(const char* name); |
24 | | - ~module_base(); |
25 | | - |
26 | | - // Add elements to the module |
27 | | - void setattr(const char* name, PyObject*); |
28 | | - void setattr(const char* name, ref const&); |
29 | | - void add(PyTypeObject* x); // just use the type's name |
30 | | - void add_type(ref); |
31 | | - |
32 | | - // Return a reference to the Python module object being built |
33 | | - ref object() const; |
34 | | - |
35 | | - private: |
36 | | - ref m_module; |
37 | | - static PyMethodDef initial_methods[1]; |
38 | | -}; |
39 | | - |
40 | | -class module : public module_base |
| 18 | +class module : public detail::module_base |
41 | 19 | { |
42 | 20 | public: |
43 | 21 | module(const char* name) |
@@ -76,11 +54,6 @@ class module : public module_base |
76 | 54 | // |
77 | 55 | // inline implementations |
78 | 56 | // |
79 | | -inline ref module_base::object() const |
80 | | -{ |
81 | | - return m_module; |
82 | | -} |
83 | | - |
84 | 57 | inline module& module::setattr(const char* name, PyObject* x) |
85 | 58 | { |
86 | 59 | this->module_base::setattr(name, x); |
|
0 commit comments