1. 23 Feb, 2017 1 commit
    • Dean Moldovan's avatar
      Make all classes with the same instance size derive from a common base · 08cbe8df
      Dean Moldovan authored
      In order to fully satisfy Python's inheritance type layout requirements,
      all types should have a common 'solid' base. A solid base is one which
      has the same instance size as the derived type (not counting the space
      required for the optional `dict_ptr` and `weakrefs_ptr`). Thus, `object`
      does not qualify as a solid base for pybind11 types and this can lead to
      issues with multiple inheritance.
      
      To get around this, new base types are created: one per unique instance
      size. There is going to be very few of these bases. They ensure Python's
      MRO checks will pass when multiple bases are involved.
      08cbe8df
  2. 16 Dec, 2016 1 commit
    • Wenzel Jakob's avatar
      WIP: PyPy support (#527) · 1d1f81b2
      Wenzel Jakob authored
      This commit includes modifications that are needed to get pybind11 to work with PyPy. The full test suite compiles and runs except for a last few functions that are commented out (due to problems in PyPy that were reported on the PyPy bugtracker).
      
      Two somewhat intrusive changes were needed to make it possible: two new tags ``py::buffer_protocol()`` and ``py::metaclass()`` must now be specified to the ``class_`` constructor if the class uses the buffer protocol and/or requires a metaclass (e.g. for static properties).
      
      Note that this is only for the PyPy version based on Python 2.7 for now. When the PyPy 3.x has caught up in terms of cpyext compliance, a PyPy 3.x patch will follow.
      1d1f81b2
  3. 20 Oct, 2016 1 commit
    • Dean Moldovan's avatar
      Support std::shared_ptr holder type out of the box · 5d28dd11
      Dean Moldovan authored
      With this there is no more need for manual user declarations like
      `PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`. Existing ones
      will still compile without error -- they will just be ignored silently.
      
      Resolves #446.
      5d28dd11
  4. 19 Sep, 2016 1 commit