1. 24 Jun, 2017 1 commit
    • Bruce Merry's avatar
      Hold strong references to keep_alive patients · 9d698f7f
      Bruce Merry authored
      This fixes #856. Instead of the weakref trick, the internals structure
      holds an unordered_map from PyObject* to a vector of references. To
      avoid the cost of the unordered_map lookup for objects that don't have
      any keep_alive patients, a flag is added to each instance to indicate
      whether there is anything to do.
      9d698f7f
  2. 02 Apr, 2017 1 commit
    • Dean Moldovan's avatar
      Add a scope guard call policy · 1ac19036
      Dean Moldovan authored
      ```c++
      m.def("foo", foo, py::call_guard<T>());
      ```
      
      is equivalent to:
      
      ```c++
      m.def("foo", [](args...) {
          T scope_guard;
          return foo(args...); // forwarded arguments
      });
      ```
      1ac19036