2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 16:52:15 +00:00

Merged 2009 GSoC work from sandbox-branches/bhy/py3k branch back into trunk.

[SVN r56305]
This commit is contained in:
Stefan Seefeld
2009-09-19 02:32:41 +00:00
parent e3f6f01588
commit ef2a02c396
52 changed files with 734 additions and 245 deletions

View File

@@ -59,7 +59,13 @@ void eval_test()
void exec_test()
{
// Register the module with the interpreter
if (PyImport_AppendInittab(const_cast<char*>("embedded_hello"), initembedded_hello) == -1)
if (PyImport_AppendInittab(const_cast<char*>("embedded_hello"),
#if PY_VERSION_HEX >= 0x03000000
PyInit_embedded_hello
#else
initembedded_hello
#endif
) == -1)
throw std::runtime_error("Failed to add embedded_hello to the interpreter's "
"builtin modules");
// Retrieve the main module
@@ -105,7 +111,7 @@ void exec_test_error()
{
// Execute a statement that raises a python exception.
python::dict global;
python::object result = python::exec("print unknown \n", global, global);
python::object result = python::exec("print(unknown) \n", global, global);
}
void exercise_embedding_html()