1. Feb 04, 2019
  2. Jan 04, 2019
  3. Jan 03, 2019
  4. Dec 01, 2018
  5. Nov 21, 2018
  6. Nov 16, 2018
  7. Nov 13, 2018
  8. Nov 12, 2018
  9. Nov 10, 2018
  10. Nov 09, 2018
  11. Nov 03, 2018
  12. Nov 01, 2018
  13. Oct 25, 2018
  14. Oct 24, 2018
  15. Oct 15, 2018
  16. Oct 11, 2018
  17. Oct 02, 2018
  18. Sep 27, 2018
  19. Sep 26, 2018
    • oremanj's avatar
      Fix potential crash when calling an overloaded function (#1327) · e7761e33
      oremanj authored
      * Fix potential crash when calling an overloaded function
      
      The crash would occur if:
      - dispatcher() uses two-pass logic (because the target is overloaded and some arguments support conversions)
      - the first pass (with conversions disabled) doesn't find any matching overload
      - the second pass does find a matching overload, but its return value can't be converted to Python
      
      The code for formatting the error message assumed `it` still pointed to the selected overload,
      but during the second-pass loop `it` was nullptr. Fix by setting `it` correctly if a second-pass
      call returns a nullptr `handle`. Add a new test that segfaults without this fix.
      
      * Make overload iteration const-correct so we don't have to iterate again on second-pass error
      
      * Change test_error_after_conversions dependencies to local classes/variables
      e7761e33
  20. Sep 14, 2018
  21. Sep 12, 2018
    • Semen Yesylevskyy's avatar
      Info about inconsistent detection of Python version between pybind11 … (#1093) · ef13fb2e
      Semen Yesylevskyy authored
      * Info about inconsistent detection of Python version between pybind11 and CMake in FAQ
      ef13fb2e
    • Wenzel Jakob's avatar
      enum_: move most functionality to a non-template implementation · f4245181
      Wenzel Jakob authored
      This commit addresses an inefficiency in how enums are created in
      pybind11. Most of the enum_<> implementation is completely generic --
      however, being a template class, it ended up instantiating vast amounts
      of essentially identical code in larger projects with many enums.
      
      This commit introduces a generic non-templated helper class that is
      compatible with any kind of enumeration. enum_ then becomes a thin
      wrapper around this new class.
      
      The new enum_<> API is designed to be 100% compatible with the old one.
      f4245181
    • Wenzel Jakob's avatar
      relax operator[] for tuples, lists, and sequences · b4b22924
      Wenzel Jakob authored
      object_api::operator[] has a powerful overload for py::handle that can
      accept slices, tuples (for NumPy), etc.
      
      Lists, sequences, and tuples provide their own specialized operator[],
      which unfortunately disables this functionality. This is accidental, and
      the purpose of this commit is to re-enable the more general behavior.
      
      This commit is tangentially related to the previous one in that it makes
      py::handle/py::object et al. behave more like their Python counterparts.
      b4b22924
    • Wenzel Jakob's avatar
      object_api: support the number protocol · 06710020
      Wenzel Jakob authored
      This commit revamps the object_api class so that it maps most C++
      operators to their Python analogs. This makes it possible to, e.g.
      perform arithmetic using a py::int_ or py::array.
      06710020
  22. Sep 11, 2018