2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-21 17:12:22 +00:00
Files
python/example/noncopyable_export.cpp
Ralf W. Grosse-Kunstleve 028a3b9750 VC++ 6.0 fixes and misc. other modifications.
[SVN r9601]
2001-03-20 02:13:28 +00:00

25 lines
547 B
C++

#include <boost/python/cross_module.hpp>
namespace python = boost::python;
#include "noncopyable.h"
extern "C"
DL_EXPORT(void)
initnoncopyable_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
}
}