- 24 Oct, 2016 3 commits
-
-
Wenzel Jakob authored
NumPy scalars to ctypes conversion support
-
Ivan Smirnov authored
This reduces direct access to internals.registered_types_cpp to just a few places.
-
Wenzel Jakob authored
-
- 23 Oct, 2016 1 commit
-
-
Ivan Smirnov authored
This avoid a hashmap lookup since the pointer to the list of direct converters is now cached in the typeinfo.
-
- 22 Oct, 2016 8 commits
-
-
Wenzel Jakob authored
-
Wenzel Jakob authored
Bugfix: bad delete if no copy ctor
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Jason Rhinelander authored
* Remove obsolete example reference * Make example fully-working (except for #includes) Fixes #456.
-
Wenzel Jakob authored
Fix def_property and related functions
-
- 21 Oct, 2016 1 commit
-
-
Dean Moldovan authored
Making `cppfunction` explicit broke `def_property` and friends. The added tests would not compile without an implicit `cppfunction`.
-
- 20 Oct, 2016 17 commits
-
-
Ben North authored
Without the previous commit, this test generates a core dump.
-
Ben North authored
type_caster_generic::cast(): The values of wrapper->value wrapper->owned are incorrect in the case that a return value policy of 'copy' is requested but there is no copy-constructor. (Similarly 'move'.) In particular, if the source object is a static instance, the destructor of the 'object' 'inst' leads to class_::dealloc() which incorrectly attempts to 'delete' the static instance. This commit re-arranges the code to be clearer as to what the values of 'value' and 'owned' should be in the various cases. Behaviour is different to previous code only in two situations: policy = copy but no copy-ctor: Old code leaves 'value = src, owned = true', which leads to trouble. New code leaves 'value = nullptr, owned = false', which is correct. policy = move but no move- or copy-ctor: old code leaves 'value = src, owned = true', which leads to trouble. New code leaves 'value = nullptr, owned = false', which is correct. -
Wenzel Jakob authored
Support std::shared_ptr holder type out of the box
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Wenzel Jakob authored
Reorganize documentation
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
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
-
Wenzel Jakob authored
Auto-implement format/numpy descriptors for enum types
-
Ivan Smirnov authored
-
Ivan Smirnov authored
-
- 17 Oct, 2016 2 commits
-
-
Wenzel Jakob authored
Make operator bool() explicit
-
Dean Moldovan authored
This prevents unwanted conversions to bool or int such as: ``` py::object my_object; std::cout << my_object << std::endl; // compiles and prints 0 or 1 int n = my_object; // compiles and is nonsense ``` With `explicit operator bool()` the above cases become compiler errors.
-
- 16 Oct, 2016 2 commits
-
-
Wenzel Jakob authored
Disable most implicit conversion constructors
-
Jason Rhinelander authored
We have various classes that have non-explicit constructors that accept a single argument, which is implicitly making them implicitly convertible from the argument. In a few cases, this is desirable (e.g. implicit conversion of std::string to py::str, or conversion of double to py::float_); in many others, however, it is unintended (e.g. implicit conversion of size_t to some pre-declared py::array_t<T> type). This disables most of the unwanted implicit conversions by marking them `explicit`, and comments the ones that are deliberately left implicit.
-
- 15 Oct, 2016 2 commits
-
-
Wenzel Jakob authored
Accept any sequence type as std::vector (or std::list)
-
Pim Schellart authored
Accept any sequence type as std::vector
-
- 14 Oct, 2016 3 commits
-
-
Wenzel Jakob authored
Fix dynamic attribute inheritance in C++
-
Dean Moldovan authored
`PyType_Ready` would usually perform the inheritance for us, but it can't adjust `tp_basicsize` appropriately.
-
Wenzel Jakob authored
Add dynamic attribute support
-
- 13 Oct, 2016 1 commit
-
-
Dean Moldovan authored
-