File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ void test()
6363 if (PyImport_AppendInittab (" embedded_hello" , initembedded_hello) == -1 )
6464 throw std::runtime_error (" Failed to add embedded_hello to the interpreter's "
6565 " builtin modules" );
66-
67- // Initialize the interpreter
68- Py_Initialize ();
69-
7066 // Retrieve the main module
7167 python::object main_module ((
7268 python::handle<>(python::borrowed (PyImport_AddModule (" __main__" )))));
@@ -169,6 +165,9 @@ test_tutorial2()
169165
170166int main ()
171167{
168+ // Initialize the interpreter
169+ Py_Initialize ();
170+
172171 if (python::handle_exception (test))
173172 {
174173 if (PyErr_Occurred ())
@@ -190,6 +189,8 @@ int main()
190189 return 1 ;
191190 }
192191
192+ // Boost.Python doesn't support Py_Finalize yet.
193+ // Py_Finalize();
193194 return 0 ;
194195}
195196#include " module_tail.cpp"
You can’t perform that action at this time.
0 commit comments