2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 05:42:30 +00:00

Updated docs and provided backwards compatibility for handle_exception()

[SVN r12764]
This commit is contained in:
Dave Abrahams
2002-02-08 22:04:01 +00:00
parent e37a97e2d5
commit 93735c7bf1
5 changed files with 21 additions and 44 deletions

View File

@@ -16,10 +16,15 @@ namespace python = boost::python;
// extension module. This is where we build the module contents.
BOOST_PYTHON_MODULE_INIT(getting_started1)
{
try {
// Create an object representing this extension module.
python::module_builder this_module("getting_started1");
// Add regular functions to the module.
this_module.def(greet, "greet");
this_module.def(square, "square");
}
catch(...) {
boost::python::handle_exception();
}
}