- 31 Jan, 2017 1 commit
-
-
Dean Moldovan authored
* Make 'any' the default markup role for Sphinx docs * Automate generation of reference docs with doxygen and breathe * Improve reference docs coverage
-
- 13 Jan, 2017 2 commits
-
-
jbarlow83 authored
* Some clarifications to section on virtual fns Primarily, I made it clear that PYBIND11_OVERLOAD_PURE_NAME is not "useful" but required in renaming situations. Also clarified that one should not bind to the trampoline helper class which I found tempting since it seems more explicit. * Remove :emphasize-lines: from cpp block, seems to suppress formatting * docs: emphasize default policy, clarify keep_alive Emphasize the default return value policy since this statement is hidden in a wall of text. Add a hint that call policies are probably required for container objects.
-
myd7349 authored
* [Doc] Fix several errors of examples from the doc * Add missing operator def. * Added missing `()` * Add missing `namespace`.
-
- 06 Jan, 2017 1 commit
-
-
Wenzel Jakob authored
-
- 04 Jan, 2017 1 commit
-
-
Wenzel Jakob authored
-
- 01 Jan, 2017 3 commits
-
-
Wenzel Jakob authored
-
Wenzel Jakob authored
-
Wenzel Jakob authored
-
- 29 Dec, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 28 Dec, 2016 1 commit
-
-
Michael König authored
-
- 26 Dec, 2016 3 commits
-
-
Wenzel Jakob authored
-
Wenzel Jakob authored
-
Wenzel Jakob authored
-
- 23 Dec, 2016 2 commits
-
-
Wenzel Jakob authored
-
Wenzel Jakob authored
-
- 19 Dec, 2016 3 commits
-
-
Jason Rhinelander authored
-
Dean Moldovan authored
Makes room for an eventual pybind11::embedded target.
-
Dean Moldovan authored
See the documentation for a description of the options.
-
- 18 Dec, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 16 Dec, 2016 1 commit
-
-
Wenzel Jakob authored
This commit includes modifications that are needed to get pybind11 to work with PyPy. The full test suite compiles and runs except for a last few functions that are commented out (due to problems in PyPy that were reported on the PyPy bugtracker). Two somewhat intrusive changes were needed to make it possible: two new tags ``py::buffer_protocol()`` and ``py::metaclass()`` must now be specified to the ``class_`` constructor if the class uses the buffer protocol and/or requires a metaclass (e.g. for static properties). Note that this is only for the PyPy version based on Python 2.7 for now. When the PyPy 3.x has caught up in terms of cpyext compliance, a PyPy 3.x patch will follow.
-
- 15 Dec, 2016 1 commit
-
-
Wenzel Jakob authored
* always_construct_holder feature to support intrusively reference-counted types * added testcase
-
- 13 Dec, 2016 2 commits
-
-
Lori A. Burns authored
-
Lori A. Burns authored
-
- 12 Dec, 2016 1 commit
-
-
Jason Rhinelander authored
This adds automatic casting when assigning to python types like dict, list, and attributes. Instead of: dict["key"] = py::cast(val); m.attr("foo") = py::cast(true); list.append(py::cast(42)); you can now simply write: dict["key"] = val; m.attr("foo") = true; list.append(42); Casts needing extra parameters (e.g. for a non-default rvp) still require the py::cast() call. set::add() is also supported. All usage is channeled through a SFINAE implementation which either just returns or casts. Combined non-converting handle and autocasting template methods via a helper method that either just returns (handle) or casts (C++ type).
-
- 09 Dec, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 08 Dec, 2016 1 commit
-
-
Dean Moldovan authored
-
- 07 Dec, 2016 1 commit
-
-
Dean Moldovan authored
-
- 17 Nov, 2016 2 commits
-
-
Wenzel Jakob authored
Following commit 90d278, the object code generated by the python bindings of nanogui (github.com/wjakob/nanogui) went up by a whopping 12%. It turns out that that project has quite a few enums where we don't really care about arithmetic operators. This commit thus partially reverts the effects of #503 by introducing an additional attribute py::arithmetic() that must be specified if the arithmetic operators are desired.
-
Dean Moldovan authored
* Deprecate the `py::object::str()` member function since `py::str(obj)` is now equivalent and preferred * Make `py::repr()` a free function * Make sure obj.cast<T>() works as expected when T is a Python type `obj.cast<T>()` should be the same as `T(obj)`, i.e. it should convert the given object to a different Python type. However, `obj.cast<T>()` usually calls `type_caster::load()` which only checks the type without doing any actual conversion. That causes a very unexpected `cast_error`. This commit makes it so that `obj.cast<T>()` and `T(obj)` are the same when T is a Python type. * Simplify pytypes converting constructor implementation It's not necessary to maintain a full set of converting constructors and assignment operators + const& and &&. A single converting const& constructor will work and there is no impact on binary size. On the other hand, the conversion functions can be significantly simplified.
-
- 16 Nov, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 15 Nov, 2016 1 commit
-
-
Alexander Stukowski authored
Added the docstring_options class, which gives global control over the generation of docstrings and function signatures.
-
- 04 Nov, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 03 Nov, 2016 2 commits
-
-
Ivan Smirnov authored
* Add type caster for std::experimental::optional * Add tests for std::experimental::optional * Support both <optional> / <experimental/optional> * Mention std{::experimental,}::optional in the docs -
Ivan Smirnov authored
-
- 01 Nov, 2016 1 commit
-
-
Dean Moldovan authored
* Make reference(_internal) the default return value policy for properties Before this, all `def_property*` functions used `automatic` as their default return value policy. This commit makes it so that: * Non-static properties use `reference_interal` by default, thus matching `def_readonly` and `def_readwrite`. * Static properties use `reference` by default, thus matching `def_readonly_static` and `def_readwrite_static`. In case `cpp_function` is passed to any `def_property*`, its policy will be used instead of any defaults. User-defined arguments in `extras` still have top priority and will override both the default policies and the ones from `cpp_function`. Resolves #436. * Almost always use return_value_policy::move for rvalues For functions which return rvalues or rvalue references, the only viable return value policies are `copy` and `move`. `reference(_internal)` and `take_ownership` would take the address of a temporary which is always an error. This commit prevents possible user errors by overriding the bad rvalue policies with `move`. Besides `move`, only `copy` is allowed, and only if it's explicitly selected by the user. This is also a necessary safety feature to support the new default return value policies for properties: `reference(_internal)`.
-
- 24 Oct, 2016 1 commit
-
-
Wenzel Jakob authored
-
- 22 Oct, 2016 1 commit
-
-
Jason Rhinelander authored
* Remove obsolete example reference * Make example fully-working (except for #includes) Fixes #456.
-
- 20 Oct, 2016 3 commits
-
-
Dean Moldovan authored
With this there is no more need for manual user declarations like `PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`. Existing ones will still compile without error -- they will just be ignored silently. Resolves #446.
-
Dean Moldovan authored
-
Dean Moldovan authored
-