2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 16:52:15 +00:00
Files
python/example/noncopyable_export.cpp
Ralf W. Grosse-Kunstleve 82edce6450 Now using BOOST_PYTHON_MODULE_INIT.
[SVN r9617]
2001-03-21 01:09:17 +00:00

23 lines
540 B
C++

#include <boost/python/cross_module.hpp>
namespace python = boost::python;
#include "noncopyable.h"
BOOST_PYTHON_MODULE_INIT(noncopyable_export)
{
try
{
python::module_builder this_module("noncopyable_export");
python::class_builder<store> store_class(this_module, "store");
python::export_converters_noncopyable(store_class);
store_class.def(python::constructor<int>());
store_class.def(&store::recall, "recall");
}
catch(...)
{
python::handle_exception(); // Deal with the exception for Python
}
}