1. 04 Feb, 2017 1 commit
  2. 01 Feb, 2017 1 commit
    • Add warning about binding multiple modules (#635) · 0558a9a7
      Issue #633 suggests people might be tempted to copy the test scripts
      self-binding code, but that's a bad idea for pretty much anything other
      than a test suite with self-contained test code.
      
      This commit adds a comment as such with a reference to the
      documentation that tells people how to do it instead.
      Jason Rhinelander committed
  3. 31 Jan, 2017 14 commits
    • Minor fixes (#613) · 12494525
      * Minor doc syntax fix
      
      The numpy documentation had a bad :file: reference (was using double
      backticks instead of single backticks).
      
      * Changed long-outdated "example" -> "tests" wording
      
      The ConstructorStats internal docs still had "from example import", and
      the main testing cpp file still used "example" in the module
      description.
      Jason Rhinelander committed
    • Pack all function call data into a single struct · bfcf952e
      This cleans up the previous commit slightly by further reducing the
      function call arguments to a single struct (containing the
      function_record, arguments vector, and parent).
      
      Although this doesn't currently change anything, it does allow for
      future functionality to have a place for precalls to store temporary
      objects that need to be destroyed after a function call (whether or not
      the call succeeds).
      
      As a concrete example, with this change #625 could be easily implemented
      (I think) by adding a std::unique_ptr<gil_scoped_release> member to the
      `function_call` struct with a precall that actually constructs it.
      Without this, the precall can't do that: the postcall won't be invoked
      if the call throws an exception.
      
      This doesn't seems to affect the .so size noticeably (either way).
      Jason Rhinelander committed
    • Move constexpr_first/last to common.h · 34d308ad
      This keeps it with constexpr_sum and the other metafunctions.
      Jason Rhinelander committed
    • Changed keep_alive template arguments from int to size_t · 3b4b9211
      Passing a negative value wasn't valid anyway, and moreover this avoids a
      little bit of extra code to avoid signed/unsigned argument warnings.
      Jason Rhinelander committed
    • Add support for positional args with args/kwargs · 2686da83
      This commit rewrites the function dispatcher code to support mixing
      regular arguments with py::args/py::kwargs arguments.  It also
      simplifies the argument loader noticeably as it no longer has to worry
      about args/kwargs: all of that is now sorted out in the dispatcher,
      which now simply appends a tuple/dict if the function takes
      py::args/py::kwargs, then passes all the arguments in a vector.
      
      When the argument loader hit a py::args or py::kwargs, it doesn't do
      anything special: it just calls the appropriate type_caster just like it
      does for any other argument (thus removing the previous special cases
      for args/kwargs).
      
      Switching to passing arguments in a single std::vector instead of a pair
      of tuples also makes things simpler, both in the dispatch and the
      argument_loader: since this argument list is strictly pybind-internal
      (i.e. it never goes to Python) we have no particular reason to use a
      Python tuple here.
      
      Some (intentional) restrictions:
      - you may not bind a function that has args/kwargs somewhere other than
        the end (this somewhat matches Python, and keeps the dispatch code a
        little cleaner by being able to not worry about where to inject the
        args/kwargs in the argument list).
      - If you specify an argument both positionally and via a keyword
        argument, you get a TypeError alerting you to this (as you do in
        Python).
      Jason Rhinelander committed
    • Add i386 build (#612) · 102c94fc
      Adds a 32-bit (debian) build to travis-ci.
      Jason Rhinelander committed
    • Improve custom holder support (#607) · ec009a7c
      * Abstract away some holder functionality (resolve #585)
      
      Custom holder types which don't have `.get()` can select the correct
      function to call by specializing `holder_traits`.
      
      * Add support for move-only holders (fix #605)
      Dean Moldovan committed
    • Numpy: better compilation errors, long double support (#619) · f7f5bc8e
      * Clarify PYBIND11_NUMPY_DTYPE documentation
      
      The current documentation and example reads as though
      PYBIND11_NUMPY_DTYPE is a declarative macro along the same lines as
      PYBIND11_DECLARE_HOLDER_TYPE, but it isn't.  The changes the
      documentation and docs example to make it clear that you need to "call"
      the macro.
      
      * Add satisfies_{all,any,none}_of<T, Preds>
      
      `satisfies_all_of<T, Pred1, Pred2, Pred3>` is a nice legibility-enhanced
      shortcut for `is_all<Pred1<T>, Pred2<T>, Pred3<T>>`.
      
      * Give better error message for non-POD dtype attempts
      
      If you try to use a non-POD data type, you get difficult-to-interpret
      compilation errors (about ::name() not being a member of an internal
      pybind11 struct, among others), for which isn't at all obvious what the
      problem is.
      
      This adds a static_assert for such cases.
      
      It also changes the base case from an empty struct to the is_pod_struct
      case by no longer using `enable_if<is_pod_struct>` but instead using a
      static_assert: thus specializations avoid the base class, POD types
      work, and non-POD types (and unimplemented POD types like std::array)
      get a more informative static_assert failure.
      
      * Prefix macros with PYBIND11_
      
      numpy.h uses unprefixed macros, which seems undesirable.  This prefixes
      them with PYBIND11_ to match all the other macros in numpy.h (and
      elsewhere).
      
      * Add long double support
      
      This adds long double and std::complex<long double> support for numpy
      arrays.
      
      This allows some simplification of the code used to generate format
      descriptors; the new code uses fewer macros, instead putting the code as
      different templated options; the template conditions end up simpler with
      this because we are now supporting all basic C++ arithmetic types (and
      so can use is_arithmetic instead of is_integral + multiple
      different specializations).
      
      In addition to testing that it is indeed working in the test script, it
      also adds various offset and size calculations there, which
      fixes the test failures under x86 compilations.
      Jason Rhinelander committed
    • Update common.h (#606) · c2d1d958
      fixed VS build, when _DEBUG is just defined without any value assigned (e.g. VS15)
      Matthias Möller committed
    • Automate generation of reference docs with doxygen and breathe (#598) · 57a9bbc6
      * Make 'any' the default markup role for Sphinx docs
      
      * Automate generation of reference docs with doxygen and breathe
      
      * Improve reference docs coverage
      Dean Moldovan committed
  4. 13 Jan, 2017 4 commits
  5. 06 Jan, 2017 2 commits
  6. 04 Jan, 2017 4 commits
  7. 03 Jan, 2017 1 commit
  8. 01 Jan, 2017 4 commits
  9. 29 Dec, 2016 2 commits
  10. 28 Dec, 2016 1 commit
  11. 26 Dec, 2016 6 commits