2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 16:52:15 +00:00

cleaning up cvs attic mess

[SVN r9831]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-04-18 01:29:23 +00:00
parent dc462cdc1f
commit cbff11296b
11 changed files with 655 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// Example by Ralf W. Grosse-Kunstleve
// See root/libs/python/doc/cross_module.html for an introduction.
#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
}
}