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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user