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 dd0e42cf72 temp files before branching
[SVN r9457]
2001-03-06 02:44:32 +00:00

24 lines
499 B
C++

#include <boost/python/x_class_builder.hpp>
namespace python = boost::python;
#include "noncopyable.h"
extern "C"
DL_EXPORT(void)
initnoncopyable_export()
{
try
{
python::module_builder this_module("noncopyable_export");
python::xptr_class_builder<store> store_class(this_module, "store");
store_class.def(python::constructor<int>());
store_class.def(&store::recall, "recall");
}
catch(...)
{
python::handle_exception(); // Deal with the exception for Python
}
}