1. 17 Apr, 2017 1 commit
  2. 15 Apr, 2017 1 commit
  3. 14 Apr, 2017 1 commit
  4. 13 Apr, 2017 4 commits
    • Make any_container implicitly constructible from arithmetic values · 201796d9
      This further reduces the constructors required in buffer_info/numpy by
      removing the need for the constructors that take a single size_t and
      just forward it on via an initializer_list to the container-accepting
      constructor.
      
      Unfortunately, in `array` one of the constructors runs into an ambiguity
      problem with the deprecated `array(handle, bool)` constructor (because
      both the bool constructor and the any_container constructor involve an
      implicit conversion, so neither has precedence), so a forwarding
      constructor is kept there (until the deprecated constructor is
      eventually removed).
      Jason Rhinelander committed
    • Accept abitrary containers and iterators for shape/strides · 5f383862
      This adds support for constructing `buffer_info` and `array`s using
      arbitrary containers or iterator pairs instead of requiring a vector.
      
      This is primarily needed by PR #782 (which makes strides signed to
      properly support negative strides, and will likely also make shape and
      itemsize to avoid mixed integer issues), but also needs to preserve
      backwards compatibility with 2.1 and earlier which accepts the strides
      parameter as a vector of size_t's.
      
      Rather than adding nearly duplicate constructors for each stride-taking
      constructor, it seems nicer to simply allow any type of container (or
      iterator pairs).  This works by replacing the existing vector arguments
      with a new `detail::any_container` class that handles implicit
      conversion of arbitrary containers into a vector of the desired type.
      It can also be explicitly instantiated with a pair of iterators (e.g.
      by passing {begin, end} instead of the container).
      Jason Rhinelander committed
    • Move buffer_info to its own header · dbb4c5b5
      Upcoming changes to buffer_info make it need some things declared in
      common.h; it also feels a bit misplaced in common.h (which is arguably
      too large already), so move it out.  (Separating this and the subsequent
      changes into separate commits to make the changes easier to distinguish
      from the move.)
      Jason Rhinelander committed
    • array: set exception message on failure · 5749b502
      When attempting to get a raw array pointer we return nullptr if given a
      nullptr, which triggers an error_already_set(), but we haven't set an
      exception message, which results in "Unknown internal error".
      
      Callers that want explicit allowing of a nullptr here already handle it
      (by clearing the exception after the call).
      Jason Rhinelander committed
  5. 12 Apr, 2017 1 commit
    • improve mkdoc.py determinism · 257df10f
      When processing many files that contain top-level items with the same
      name (e.g. "operator<<"), the output was non-deterministic and depended
      on the order in which the different Clang processes finished. This
      commit adds sorting that also accounts for the filename to prevent
      random changes from run to run.
      Wenzel Jakob committed
  6. 11 Apr, 2017 1 commit
  7. 10 Apr, 2017 1 commit
  8. 09 Apr, 2017 2 commits
    • Appveyor: Remove /m to attempt to resolve build failures · 4c72ec22
      /m also doesn't seem to have made the builds any faster.
      Jason Rhinelander committed
    • Fix Eigen argument doc strings · e9e17746
      Many of the Eigen type casters' name() methods weren't wrapping the type
      description in a `type_descr` object, which thus wasn't adding the
      "{...}" annotation used to identify an argument which broke the help
      output by skipping eigen arguments.
      
      The test code I had added even had some (unnoticed) broken output (with
      the "arg0: " showing up in the return value).
      
      This commit also adds test code to ensure that named eigen arguments
      actually work properly, despite the invalid help output.  (The added
      tests pass without the rest of this commit).
      Jason Rhinelander committed
  9. 08 Apr, 2017 2 commits
  10. 07 Apr, 2017 2 commits
  11. 06 Apr, 2017 3 commits
    • Remove object::borrowed/stolen · 16c86638
      PR #771 deprecated them as they can cause linking failures (#770), but
      the deprecation tags cause warnings on GCC 5.x through 6.2.x.  Removing
      them entirely will break backwards-compatibility consequences, but the
      effects should be minimal (only code that was inheriting from `object`
      could get at them at all as they are protected).
      
      Fixes #777
      Jason Rhinelander committed
    • Fix test_cmake_build failure with bare python exe name (fix #783) · 555dc4f0
      Besides appearing in the CMake GUI, the `:FILENAME` specifier changes
      behavior as well:
      
      cmake -DPYTHON_EXECUTABLE=python ..  # FAIL, can't find python
      cmake -DPYTHON_EXECUTABLE=/path/to/python ..  # OK
      cmake -DPYTHON_EXECUTABLE:FILENAME=python ..  # OK
      cmake -DPYTHON_EXECUTABLE:FILENAME=/path/to/python ..  # OK
      Dean Moldovan committed
    • Skip VS2015/x86 builds · 087b8d84
      AppVeyor just added support for excluding specific jobs; thhis commit
      cuts the number of builds down to 6 from 8 by eliminating the VS2015 x86
      builds.
      Jason Rhinelander committed
  12. 05 Apr, 2017 3 commits
  13. 02 Apr, 2017 3 commits
  14. 01 Apr, 2017 1 commit
  15. 30 Mar, 2017 2 commits
  16. 28 Mar, 2017 2 commits
    • Support raw string literals as input for py::eval (#766) · 194d8b99
      * Support raw string literals as input for py::eval
      * Dedent only when needed
      Dean Moldovan committed
    • Deprecated borrowed/stolen for borrowed_t{}/stolen_t{} (#771) · 6db60cd9
      The constexpr static instances can cause linking failures if the
      compiler doesn't optimize away the reference, as reported in #770.
      
      There's no particularly nice way of fixing this in C++11/14: we can't
      inline definitions to match the declaration aren't permitted for
      non-templated static variables (C++17 *does* allows "inline" on
      variables, but that obviously doesn't help us.)
      
      One solution that could work around it is to add an extra inherited
      subclass to `object`'s hierarchy, but that's a bit of a messy solution
      and was decided against in #771 in favour of just deprecating (and
      eventually dropping) the constexpr statics.
      
      Fixes #770.
      Jason Rhinelander committed
  17. 26 Mar, 2017 1 commit
  18. 24 Mar, 2017 1 commit
    • Arch-indep CMake packaging (#764) · 5b503764
      * Arch-indep CMake packaging
      
      Since pybind11 is a header-only library, the CMake packaging does not have to carry any architecture specific checks. Without this patch, the detection of pybind11 will fail on 32-bit architectures if the project was built on a 64-bit machine and vice-versa. This fix is similar to what is applied to `Eigen` and other header-only C++ libraries.
      Ghislain Antony Vaillant committed
  19. 22 Mar, 2017 8 commits