- 09 Nov, 2018 2 commits
-
-
Wenzel Jakob committed
-
This PR brings the std::array<> caster in sync with the other STL type casters: to accept an arbitrary sequence as input (rather than a list, which is too restrictive).
Wenzel Jakob committed
-
- 03 Nov, 2018 1 commit
-
-
Michał Wawrzyniec Urbańczyk committed
-
- 01 Nov, 2018 1 commit
-
-
Add a detailed link to Python 3 documentation. Add a caveat about the program terminating if initializing the interpreter fails.
Josh Kelley committed
-
- 24 Oct, 2018 4 commits
-
-
* Issue #1532: Incompatible config options, /MP vs /Gm for MSVC in DEBUG
Rune Paamand committed -
Wenzel Jakob committed
-
Tarcísio Fischer committed
-
Ryota Suzuki committed
-
- 14 Oct, 2018 1 commit
-
-
cdyson37 committed
-
- 11 Oct, 2018 1 commit
-
-
* Fix for Issue #1258 list_caster::load method will now check for a Python string and prevent its automatic conversion to a list. This should fix the issue "pybind11/stl.h converts string to vector<string> #1258" (https://github.com/pybind/pybind11/issues/1258) * Added tests for fix of issue #1258 * Changelog: stl string auto-conversion
Allan Leal committed
-
- 10 Oct, 2018 1 commit
-
-
Henry Schreiner committed
-
- 02 Oct, 2018 1 commit
-
-
Jason Rhinelander committed
-
- 27 Sep, 2018 1 commit
-
-
* Update iostream.h: Changed a local varname 'self' to 'self_' Avoiding conflicts in namespace pybind11::self. https://github.com/pybind/pybind11/issues/1531
Rune Paamand committed
-
- 25 Sep, 2018 1 commit
-
-
* Fix potential crash when calling an overloaded function The crash would occur if: - dispatcher() uses two-pass logic (because the target is overloaded and some arguments support conversions) - the first pass (with conversions disabled) doesn't find any matching overload - the second pass does find a matching overload, but its return value can't be converted to Python The code for formatting the error message assumed `it` still pointed to the selected overload, but during the second-pass loop `it` was nullptr. Fix by setting `it` correctly if a second-pass call returns a nullptr `handle`. Add a new test that segfaults without this fix. * Make overload iteration const-correct so we don't have to iterate again on second-pass error * Change test_error_after_conversions dependencies to local classes/variables
oremanj committed
-
- 14 Sep, 2018 2 commits
-
-
Davis E. King committed
-
Wenzel Jakob committed
-
- 11 Sep, 2018 8 commits
-
-
* Info about inconsistent detection of Python version between pybind11 and CMake in FAQ
Semen Yesylevskyy committed -
This commit addresses an inefficiency in how enums are created in pybind11. Most of the enum_<> implementation is completely generic -- however, being a template class, it ended up instantiating vast amounts of essentially identical code in larger projects with many enums. This commit introduces a generic non-templated helper class that is compatible with any kind of enumeration. enum_ then becomes a thin wrapper around this new class. The new enum_<> API is designed to be 100% compatible with the old one.
Wenzel Jakob committed -
object_api::operator[] has a powerful overload for py::handle that can accept slices, tuples (for NumPy), etc. Lists, sequences, and tuples provide their own specialized operator[], which unfortunately disables this functionality. This is accidental, and the purpose of this commit is to re-enable the more general behavior. This commit is tangentially related to the previous one in that it makes py::handle/py::object et al. behave more like their Python counterparts.
Wenzel Jakob committed -
This commit revamps the object_api class so that it maps most C++ operators to their Python analogs. This makes it possible to, e.g. perform arithmetic using a py::int_ or py::array.
Wenzel Jakob committed -
* check for already existing enum value added; added test * added enum value name to exception message * test for defining enum with multiple identical names moved to test_enum.cpp/py
Krzysztof Fornalczyk committed -
Wenzel Jakob committed
-
Jeff VanOss committed
-
Wenzel Jakob committed
-
- 08 Sep, 2018 1 commit
-
-
* VS 15.8.0 Preview 4.0 has a bug with alias templates
Michael Goulding committed
-
- 29 Aug, 2018 4 commits
-
-
pybind11 headers passed via the `pybind11_add_module` CMake function can now be included as `SYSTEM` includes (`-isystem`). This allows to set stricter (or experimental) warnings in calling projects that might throw otherwise in headers a user of pybind11 can not influence.
Axel Huebl committed -
builds against a python debug library were unreliable and could lead to symbol errors during linking. Setting the `Py_DEBUG` define is necessary when linking against a debug build: https://stackoverflow.com/questions/39161202/how-to-work-around-missing-pymodule-create2-in-amd64-win-python35-d-lib https://docs.python.org/2/c-api/intro.html#debugging-builds https://docs.python.org/3.6/c-api/intro.html#debugging-builds
Axel Huebl committed -
Wenzel Jakob committed
-
Justin Bassett committed
-
- 28 Aug, 2018 4 commits
-
-
Henry Schreiner committed
-
Matthias Geier committed
-
Wenzel Jakob committed
-
This PR adds a new py::ellipsis() method which can be used in conjunction with NumPy's generalized slicing support. For instance, the following is now valid (where "a" is a NumPy array): py::array b = a[py::make_tuple(0, py::ellipsis(), 0)];
Wenzel Jakob committed
-
- 19 Jul, 2018 1 commit
-
-
Catch v2 changed the `run(...)` signature to take a `char *argv[]`, arguing partly that technically a `char *argv[]` type is the correct `main()` signature rather than `const char *argv[]`. Dropping the `const` here doesn't appear to cause any problems with catch v1 (tested against both the cmake-downloaded 1.9.3 and Debian's 1.12.1 package) so we can follow suit.
Jason Rhinelander committed
-
- 17 Jul, 2018 4 commits
-
-
* stl.h: propagate return value policies to type-specific casters Return value policies for containers like those handled in in 'stl.h' are currently broken. The problem is that detail::return_value_policy_override<C>::policy() always returns 'move' when given a non-pointer/reference type, e.g. 'std::vector<...>'. This is sensible behavior for custom types that are exposed via 'py::class_<>', but it does not make sense for types that are handled by other type casters (STL containers, Eigen matrices, etc.). This commit changes the behavior so that detail::return_value_policy_override only becomes active when the type caster derives from type_caster_generic. Furthermore, the override logic is called recursively in STL type casters to enable key/value-specific behavior.
Wenzel Jakob committed -
Switching deprecated Thread Local Storage (TLS) usage in Python 3.7 to Thread Specific Storage (TSS) (#1454) * Switching deprecated Thread Local Storage (TLS) usage in Python 3.7 to Thread Specific Storage (TSS) * Changing Python version from 3.6 to 3.7 for Travis CI, to match brew's version of Python 3 * Introducing PYBIND11_ macros to switch between TLS and TSS API
Yannick Jadoul committed -
Boris Dalstein committed
-
The current code requires implicitly that integral types are cast-able to floating point. In case of strongly-typed integrals (e.g. as explained at http://www.ilikebigbits.com/blog/2014/5/6/type-safe-identifiers-in-c) this is not always the case. This commit uses SFINAE to move the numeric conversions into separate `cast()` implementations to avoid the issue.
Dennis Luxen committed
-
- 24 Jun, 2018 2 commits
-
-
Thomas Hrabe committed
-
* Silence GCC8's -Wcast-function-type. See https://bugs.python.org/issue33012 and PRs linked therein.
Antony Lee committed
-