1. 20 Aug, 2020 1 commit
  2. 19 Aug, 2020 1 commit
    • Henry Schreiner's avatar
      feat: new FindPython support (#2370) · 1729aae9
      Henry Schreiner authored
      * feat: FindPython support
      
      * refactor: rename to PYBIND11_FINDPYTHON
      
      * docs: Caps fixes
      
      * feat: NOPYTHON mode
      
      * test: check simple call
      
      * docs: add changelog/upgrade guide
      
      * feat: Support Python3 and Python2
      
      * refactor: Use targets in tests
      
      * fix: support CMake 3.4+
      
      * feat: classic search also finds virtual environments
      
      * docs: some updates from @wjakob's review
      
      * fix: wrong name for QUIET mode variable, reported by @skoslowski
      
      * refactor: cleaner output messaging
      
      * fix: support debug Python's in FindPython mode too
      
      * fixup! refactor: cleaner output messaging
      
      * fix: missing pybind11_FOUND and pybind11_INCLUDE_DIR restored to subdir mode
      
      * fix: nicer reporting of Python / PyPy
      
      * fix: out-of-order variable fix
      
      * docs: minor last-minute cleanup
      1729aae9
  3. 16 Aug, 2020 1 commit
  4. 04 Aug, 2020 1 commit
  5. 23 Jul, 2020 1 commit
  6. 20 Jul, 2020 1 commit
  7. 15 Jul, 2020 1 commit
    • Kota Yamaguchi's avatar
      Fix undefined memoryview format (#2223) · e2488698
      Kota Yamaguchi authored
      * Fix undefined memoryview format
      
      * Add missing <algorithm> header
      
      * Add workaround for py27 array compatibility
      
      * Workaround py27 memoryview behavior
      
      * Fix memoryview constructor from buffer_info
      
      * Workaround PyMemoryView_FromMemory availability in py27
      
      * Fix up memoryview tests
      
      * Update memoryview test from buffer to check signedness
      
      * Use static factory method to create memoryview
      
      * Remove ndim arg from memoryview::frombuffer and add tests
      
      * Allow ndim=0 memoryview and documentation fixup
      
      * Use void* to align to frombuffer method signature
      
      * Add const variants of frombuffer and frommemory
      
      * Add memory view section in doc
      
      * Fix docs
      
      * Add test for null buffer
      
      * Workaround py27 nullptr behavior in test
      
      * Rename frombuffer to from_buffer
      e2488698
  8. 07 Jul, 2020 1 commit
  9. 30 Jun, 2020 2 commits
  10. 10 Jun, 2020 1 commit
  11. 26 Apr, 2020 5 commits
  12. 14 Nov, 2019 1 commit
  13. 19 Jul, 2019 1 commit
  14. 22 Jun, 2019 1 commit
  15. 11 Jun, 2019 2 commits
  16. 10 Jun, 2019 5 commits
  17. 16 Nov, 2018 2 commits
  18. 28 Aug, 2018 1 commit
  19. 24 Jun, 2018 1 commit
  20. 24 May, 2018 1 commit
  21. 07 May, 2018 1 commit
  22. 06 May, 2018 2 commits
  23. 14 Apr, 2018 1 commit
    • oremanj's avatar
      Add basic support for tag-based static polymorphism (#1326) · fd9bc8f5
      oremanj authored
      * Add basic support for tag-based static polymorphism
      
      Sometimes it is possible to look at a C++ object and know what its dynamic type is,
      even if it doesn't use C++ polymorphism, because instances of the object and its
      subclasses conform to some other mechanism for being self-describing; for example,
      perhaps there's an enumerated "tag" or "kind" member in the base class that's always
      set to an indication of the correct type. This might be done for performance reasons,
      or to permit most-derived types to be trivially copyable. One of the most widely-known
      examples is in LLVM: https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html
      
      This PR permits pybind11 to be informed of such conventions via a new specializable
      detail::polymorphic_type_hook<> template, which generalizes the previous logic for
      determining the runtime type of an object based on C++ RTTI. Implementors provide
      a way to map from a base class object to a const std::type_info* for the dynamic
      type; pybind11 then uses this to ensure that casting a Base* to Python creates a
      Python object that knows it's wrapping the appropriate sort of Derived.
      
      There are a number of restrictions with this tag-based static polymorphism support
      compared to pybind11's existing support for built-in C++ polymorphism:
      
      - there is no support for this-pointer adjustment, so only single inheritance is permitted
      - there is no way to make C++ code call new Python-provided subclasses
      - when binding C++ classes that redefine a method in a subclass, the .def() must be
        repeated in the binding for Python to know about the update
      
      But these are not much of an issue in practice in many cases, the impact on the
      complexity of pybind11's innards is minimal and localized, and the support for
      automatic downcasting improves usability a great deal.
      fd9bc8f5
  24. 09 Apr, 2018 1 commit
  25. 03 Apr, 2018 1 commit
    • Patrik Huber's avatar
      Fix missing word typo · 41a4fd8a
      Patrik Huber authored
      I think that there's the word "for" missing for that sentence to be correct.
      Please double-check that the sentence means what it's supposed to mean. :-)
      41a4fd8a
  26. 10 Mar, 2018 1 commit
    • Jason Rhinelander's avatar
      Improve macro type handling for types with commas · e88656ab
      Jason Rhinelander authored
      - PYBIND11_MAKE_OPAQUE now takes ... rather than a single argument and
        expands it with __VA_ARGS__; this lets templated, comma-containing
        types get through correctly.
      - Adds a new macro PYBIND11_TYPE() that lets you pass the type into a
        macro as a single argument, such as:
      
            PYBIND11_OVERLOAD(PYBIND11_TYPE(R<1,2>), PYBIND11_TYPE(C<3,4>), func)
      
        Unfortunately this only works for one macro call: to forward the
        argument on to the next macro call (without the processor breaking it
        up again) requires also adding the PYBIND11_TYPE(...) to type macro
        arguments in the PYBIND11_OVERLOAD_... macro chain.
      - updated the documentation with these two changes, and use them at a couple
        places in the test suite to test that they work.
      e88656ab
  27. 28 Feb, 2018 1 commit
  28. 11 Jan, 2018 1 commit