Commit 17b10d7c by Wenzel Jakob

functional.h: acquire GIL before calling Python function

parent 2f6662e1
...@@ -24,6 +24,7 @@ public: ...@@ -24,6 +24,7 @@ public:
return false; return false;
object src(src_, true); object src(src_, true);
value = [src](Args... args) -> Return { value = [src](Args... args) -> Return {
gil_scoped_acquire acq;
object retval(src.call(std::move(args)...)); object retval(src.call(std::move(args)...));
/* Visual studio 2015 parser issue: need parentheses around this expression */ /* Visual studio 2015 parser issue: need parentheses around this expression */
return (retval.template cast<Return>()); return (retval.template cast<Return>());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment