1. 24 Oct, 2018 1 commit
  2. 14 Oct, 2018 1 commit
  3. 11 Oct, 2018 1 commit
    • Allan Leal's avatar
      Fix for Issue #1258 (#1298) · e76dff77
      Allan Leal authored
      * Fix for Issue #1258
      
      list_caster::load method will now check for a Python string and prevent its automatic conversion to a list.
      This should fix the issue "pybind11/stl.h converts string to vector<string> #1258" (https://github.com/pybind/pybind11/issues/1258)
      
      * Added tests for fix of issue #1258
      
      * Changelog: stl string auto-conversion
      e76dff77
  4. 10 Oct, 2018 1 commit
  5. 02 Oct, 2018 1 commit
  6. 27 Sep, 2018 1 commit
  7. 25 Sep, 2018 1 commit
    • 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
  8. 14 Sep, 2018 2 commits
  9. 11 Sep, 2018 8 commits
  10. 08 Sep, 2018 1 commit
  11. 29 Aug, 2018 4 commits
  12. 28 Aug, 2018 4 commits
  13. 19 Jul, 2018 1 commit
    • Jason Rhinelander's avatar
      Fix compatibility with catch v2 · f7bc18f5
      Jason Rhinelander authored
      Catch v2 changed the `run(...)` signature to take a `char *argv[]`,
      arguing partly that technically a `char *argv[]` type is the correct
      `main()` signature rather than `const char *argv[]`.
      
      Dropping the `const` here doesn't appear to cause any problems with
      catch v1 (tested against both the cmake-downloaded 1.9.3 and Debian's
      1.12.1 package) so we can follow suit.
      f7bc18f5
  14. 17 Jul, 2018 4 commits
    • Wenzel Jakob's avatar
      stl.h: propagate return value policies to type-specific casters (#1455) · cbd16a82
      Wenzel Jakob authored
      * stl.h: propagate return value policies to type-specific casters
      
      Return value policies for containers like those handled in in 'stl.h'
      are currently broken.
      
      The problem is that detail::return_value_policy_override<C>::policy()
      always returns 'move' when given a non-pointer/reference type, e.g.
      'std::vector<...>'.
      
      This is sensible behavior for custom types that are exposed via
      'py::class_<>', but it does not make sense for types that are handled by
      other type casters (STL containers, Eigen matrices, etc.).
      
      This commit changes the behavior so that
      detail::return_value_policy_override only becomes active when the type
      caster derives from type_caster_generic.
      
      Furthermore, the override logic is called recursively in STL type
      casters to enable key/value-specific behavior.
      cbd16a82
    • Yannick Jadoul's avatar
      Switching deprecated Thread Local Storage (TLS) usage in Python 3.7 to Thread... · b4719a60
      Yannick Jadoul authored
      Switching deprecated Thread Local Storage (TLS) usage in Python 3.7 to Thread Specific Storage (TSS) (#1454)
      
      * Switching deprecated Thread Local Storage (TLS) usage in Python 3.7 to Thread Specific Storage (TSS)
      
      * Changing Python version from 3.6 to 3.7 for Travis CI, to match brew's version of Python 3
      
      * Introducing PYBIND11_ macros to switch between TLS and TSS API
      b4719a60
    • Boris Dalstein's avatar
      Fix typo in doc: build-in -> built-in · b30734ee
      Boris Dalstein authored
      b30734ee
    • Dennis Luxen's avatar
      Untangle cast logic to not implicitly require castability (#1442) · 221fb1e1
      Dennis Luxen authored
      The current code requires implicitly that integral types are cast-able to floating point. In case of strongly-typed integrals (e.g. as explained at http://www.ilikebigbits.com/blog/2014/5/6/type-safe-identifiers-in-c) this is not always the case.
      
      This commit uses SFINAE to move the numeric conversions into separate `cast()` implementations to avoid the issue.
      221fb1e1
  15. 24 Jun, 2018 4 commits
  16. 21 Jun, 2018 2 commits
  17. 15 Jun, 2018 1 commit
    • Antony Lee's avatar
      Properly report exceptions thrown during module initialization. · 58e551cc
      Antony Lee authored
      If an exception is thrown during module initialization, the
      error_already_set destructor will try to call `get_internals()` *after*
      setting Python's error indicator, resulting in a `SystemError: ...
      returned with an error set`.
      
      Fix that by temporarily stashing away the error indicator in the
      destructor.
      58e551cc
  18. 24 May, 2018 1 commit
  19. 18 May, 2018 1 commit