1. 07 Oct, 2016 1 commit
  2. 02 Oct, 2016 1 commit
    • Jason Rhinelander's avatar
      Re-add (but deprecated) bool operator for attr/items · 7b8e3f9e
      Jason Rhinelander authored
      PR #425 removed the bool operator from attribute accessors.  This is
      likely in use by existing code as it was the only way before #425 added
      the `hasattr` function to check for the existence of an attribute, via:
      
          if (obj.attr("foo")) { ... }
      
      This commit adds it back in for attr and item accessors, but with a
      deprecation warning to use `hasattr(obj, ...)` or `obj.contains(...)`
      instead.
      7b8e3f9e
  3. 30 Sep, 2016 2 commits
  4. 29 Sep, 2016 1 commit
  5. 27 Sep, 2016 2 commits
  6. 23 Sep, 2016 3 commits
  7. 22 Sep, 2016 3 commits
  8. 19 Sep, 2016 5 commits
  9. 16 Sep, 2016 1 commit
    • Jason Rhinelander's avatar
      Added py::register_exception for simple case (#296) · b3794f10
      Jason Rhinelander authored
      The custom exception handling added in PR #273 is robust, but is overly
      complex for declaring the most common simple C++ -> Python exception
      mapping that needs only to copy `what()`.  This add a simpler
      `py::register_exception<CppExp>(module, "PyExp");` function that greatly
      simplifies the common basic case of translation of a simple CppException
      into a simple PythonException, while not removing the more advanced
      capabilities of defining custom exception handlers.
      b3794f10
  10. 14 Sep, 2016 1 commit
  11. 13 Sep, 2016 5 commits
  12. 12 Sep, 2016 1 commit
  13. 11 Sep, 2016 3 commits
  14. 10 Sep, 2016 7 commits
  15. 09 Sep, 2016 1 commit
    • Jason Rhinelander's avatar
      Implement py::init_alias<>() constructors · ec62d977
      Jason Rhinelander authored
      This commit adds support for forcing alias type initialization by
      defining constructors with `py::init_alias<arg1, arg2>()` instead of
      `py::init<arg1, arg2>()`.  Currently py::init<> only results in Alias
      initialization if the type is extended in python, or the given
      arguments can't be used to construct the base type, but can be used to
      construct the alias.  py::init_alias<>, in contrast, always invokes the
      constructor of the alias type.
      
      It looks like this was already the intention of
      `py::detail::init_alias`, which was forward-declared in
      86d825f3, but was apparently never
      finished: despite the existance of a .def method accepting it, the
      `detail::init_alias` class isn't actually defined anywhere.
      
      This commit completes the feature (or possibly repurposes it), allowing
      declaration of classes that will always initialize the trampoline which
      is (as I argued in #397) sometimes useful.
      ec62d977
  16. 08 Sep, 2016 3 commits
    • Jason Rhinelander's avatar
      Template simplifications · 5aa2cd5e
      Jason Rhinelander authored
      Switch count_t to use constexpr_sum (under non-MSVC), and then make
      all_of_t/any_of_t use it instead of doing the sum itself.
      
      For MSVC, count_t is still done using template recursion, but
      all_of_t/any_of_t can also make use of it.
      5aa2cd5e
    • Jason Rhinelander's avatar
      Fix type alias initialization · 9c6859ee
      Jason Rhinelander authored
      Type alias for alias classes with members didn't work properly: space
      was only allocated for sizeof(type), but if we want to be able to put a
      type_alias instance there, we need sizeof(type_alias), but
      sizeof(type_alias) > sizeof(type) whenever type_alias has members.
      9c6859ee
    • Wenzel Jakob's avatar
      fixed Py_None reference couting · 9d7f7a38
      Wenzel Jakob authored
      9d7f7a38