2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-24 06:02:14 +00:00

Add examples that were meant to go here in the first place, but

were accidentally added to the main branch.


[SVN r9022]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-02-08 01:51:09 +00:00
parent 82ef4c070d
commit 52ab91e34c
11 changed files with 324 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
#include <boost/python/class_builder.hpp>
#include <boost/python/detail/import_extension_class.hpp>
namespace python = boost::python;
#include "store.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
}
}