commit | cd2d3ad5df688e7df208896ace31364350488b7e | [log] [tgz] |
---|---|---|
author | Dean Moldovan <dean0x7d@gmail.com> | Sat Jun 24 21:00:18 2017 +0200 |
committer | Dean Moldovan <dean0x7d@gmail.com> | Sat Jun 24 21:59:55 2017 +0200 |
tree | b02587d6b1ace03026137ca7ef929a2929b5425c | |
parent | 9d698f7fcc21c56ef59f6814631d722dcb466dcc [diff] |
Fix embedded threads test on MSVC2015 / Python 2.7
diff --git a/tests/test_embed/test_interpreter.cpp b/tests/test_embed/test_interpreter.cpp index 2d5823c..acbad6b 100644 --- a/tests/test_embed/test_interpreter.cpp +++ b/tests/test_embed/test_interpreter.cpp
@@ -205,7 +205,7 @@ for (auto i = 0; i < num_threads; ++i) { threads.emplace_back([&]() { py::gil_scoped_acquire gil{}; - py::exec("count += 1", py::globals(), locals); + locals["count"] = locals["count"].cast<int>() + 1; }); }