mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
functional.h: acquire GIL before calling Python function
This commit is contained in:
parent
2f6662e174
commit
17b10d7cbf
@ -24,6 +24,7 @@ public:
|
||||
return false;
|
||||
object src(src_, true);
|
||||
value = [src](Args... args) -> Return {
|
||||
gil_scoped_acquire acq;
|
||||
object retval(src.call(std::move(args)...));
|
||||
/* Visual studio 2015 parser issue: need parentheses around this expression */
|
||||
return (retval.template cast<Return>());
|
||||
|
Loading…
Reference in New Issue
Block a user