Wenzel Jakob
c48da92561
Merge branch 'cygwin' of https://github.com/BorisSchaeling/pybind11 into BorisSchaeling-cygwin
2016-05-29 12:46:21 +02:00
Wenzel Jakob
67a6392987
very minor cmake adjustments
2016-05-29 12:35:16 +02:00
Wenzel Jakob
1503d2fb50
Merge pull request #207 from dean0x7d/cmake
...
Simplify CMake build using add_subdirectory
2016-05-29 12:29:36 +02:00
Boris Schäling
20ee935203
Use decltype to deduce return type of PyThread_create_key
2016-05-28 12:26:18 +02:00
Dean Moldovan
9fb50c56d0
Add LTO and strip to pybind11_add_module
2016-05-27 21:42:43 +02:00
Wenzel Jakob
86d825f330
Redesigned virtual call mechanism and user-facing syntax (breaking change!)
...
Sergey Lyskov pointed out that the trampoline mechanism used to override
virtual methods from within Python caused unnecessary overheads when
instantiating the original (i.e. non-extended) class.
This commit removes this inefficiency, but some syntax changes were
needed to achieve this. Projects using this features will need to make a
few changes:
In particular, the example below shows the old syntax to instantiate a
class with a trampoline:
class_<TrampolineClass>("MyClass")
.alias<MyClass>()
....
This is what should be used now:
class_<MyClass, std::unique_ptr<MyClass, TrampolineClass>("MyClass")
....
Importantly, the trampoline class is now specified as the *third*
argument to the class_ template, and the alias<..>() call is gone. The
second argument with the unique pointer is simply the default holder
type used by pybind11.
2016-05-26 13:36:24 +02:00
Yung-Yu Chen
114bfeb762
pybind11::args should have been derived from tuple
...
args was derived from list, but cpp_function::dispatcher sends a tuple to it->impl (line #346 and #392 in pybind11.h). As a result args::size() and args::operator[] don't work at all. On my mac args::size() returns -1. Making args a subclass of tuple fixes it.
2016-05-25 21:09:35 +08:00
Wenzel Jakob
1e3be73a52
PYBIND11_OVERLOAD_NAME and PYBIND11_OVERLOAD_PURE_NAME ( fixes #205 )
2016-05-24 23:42:14 +02:00
Andreas Bergmeier
2dd215711a
Fixed expected test examples for more verbose error output.
2016-05-24 10:15:43 +02:00
Dean Moldovan
8c6b0b8333
Don't build tests when project is used via add_subdirectory
2016-05-23 00:12:37 +02:00
Wenzel Jakob
43b09af3a9
example12 clarifications
2016-05-21 01:11:11 +02:00
Wenzel Jakob
b47a9de035
ability to prevent force casts in numpy arguments
2016-05-19 16:02:09 +02:00
Wenzel Jakob
3f200fab22
don't implicitly convert doubles to ints
2016-05-17 15:35:29 +02:00
Wenzel Jakob
00c7d6ccc7
Merge branch 'stl_bind'
2016-05-16 12:33:20 +02:00
Wenzel Jakob
25c03cecfa
stl_bind redesign & cleanup pass
2016-05-16 12:12:58 +02:00
Sergey Lyskov
9ee4f92b06
Refactoring vector_binder so it now a function
2016-05-15 20:46:07 +02:00
Sergey Lyskov
a95bde1ea5
Adding documentation for value_error. Fixing various formatting issues. Removing redundant binding for C++ style methods. Adding bindings for iterator and slicing protocol. Extending examples.
2016-05-15 20:46:07 +02:00
Sergey Lyskov
a315c7a25a
Adding Python-style modifiers for vector. Wrapping has_insertion_operator_implementation in _MSC_VER ifdef’s. Adding ‘!=0’ instead of bool cast’s.
2016-05-15 20:46:07 +02:00
Sergey Lyskov
eae7744c0e
adding stl_binders
2016-05-15 20:46:07 +02:00
Wenzel Jakob
178c8a899d
nicer type_caster::load() calling conventions
2016-05-15 20:23:27 +02:00
Wenzel Jakob
9f272ddc73
updated testcase reference result
2016-05-08 14:40:57 +02:00
Wenzel Jakob
6c03beb867
enable *args and **kwargs notation ( closes #190 )
2016-05-08 14:34:09 +02:00
Wenzel Jakob
9e0a0568fe
transparent conversion of dense and sparse Eigen types
2016-05-05 21:44:29 +02:00
Wenzel Jakob
876eeab4ca
redesigned format_descriptor<> and npy_format_descriptor<>
...
This somewhat heavyweight solution will avoid size_t/long long/long/int
mismatches on various platforms once and for all. The previous template
overloads could e.g. not handle size_t on Darwin.
One gotcha: the 'format_descriptor<T>::value()' syntax changed to just
'format_descriptor<T>::value'
2016-05-04 22:36:57 +02:00
Wenzel Jakob
bd57eb484d
don't try to cast 'None' into a C++ lvalue reference
2016-05-01 14:42:20 +02:00
Wenzel Jakob
9059bd8134
added test for issue #70
2016-05-01 10:39:45 +02:00
Wenzel Jakob
fc92d82bba
added [[noreturn]] attribute to pybind11_fail
2016-04-30 23:55:44 +02:00
Wenzel Jakob
d2b628bba4
added testcase for issue #187
2016-04-30 23:19:19 +02:00
Wenzel Jakob
81e0975b82
clarified pickle version requirements ( fixes #186 )
2016-04-30 23:16:31 +02:00
Wenzel Jakob
e707497019
restructured code in issues.cpp
2016-04-30 22:44:00 +02:00
Wenzel Jakob
772c6d54d6
enable passing C++ instances to void*-valued arguments
2016-04-30 21:28:45 +02:00
Wenzel Jakob
e8b9dd263c
fixed docstring generation for void pointers
2016-04-30 19:35:24 +02:00
Wenzel Jakob
06f56ee1e9
opaque type redesign
2016-04-28 17:49:46 +02:00
Wenzel Jakob
6ca6e82f7c
fix various iterator issues ( fixes #181 )
2016-04-27 14:33:52 +02:00
Wenzel Jakob
f7b5874ca3
new move value policy
2016-04-25 23:04:27 +02:00
Wenzel Jakob
0871228f42
opaque<> clarifications
2016-04-22 16:52:15 +02:00
Wenzel Jakob
dbe43ffcce
completed implicit type casters for reference_wrapper
2016-04-21 12:21:14 +02:00
Wenzel Jakob
f54ded74f1
added caster for std::reference_wrapper ( fixes #171 )
2016-04-20 17:00:57 +02:00
Wenzel Jakob
8cb6cb33ef
minor cleanups in common.h; updated author info and copyright year
2016-04-18 10:53:38 +02:00
Wenzel Jakob
1dc940d4b7
quenched -pendantic warnings ( closes #167 )
2016-04-18 10:41:44 +02:00
Wenzel Jakob
b282595bba
convenience wrapper for constructing iterators ( fixes #142 )
2016-04-14 00:23:37 +02:00
Wenzel Jakob
057d056139
fix testcases on Python 3.x
2016-04-13 14:42:17 +02:00
Wenzel Jakob
d7efa4ff7b
return best representation of polymorphic types ( fixes #105 )
2016-04-13 13:51:33 +02:00
Wenzel Jakob
1c329aab5a
pickling support ( fixes #144 )
2016-04-13 02:58:56 +02:00
Wenzel Jakob
f5c154ade9
address issue with virtual function dispatch ( fixes #159 )
2016-04-11 18:13:08 +02:00
Wenzel Jakob
9f0dfce84b
returning unique pointers is now allowed
2016-04-06 17:38:18 +02:00
Wenzel Jakob
9e75905b69
fix testcase issue on windows related to unicode encoding
2016-03-31 14:23:43 +02:00
Wenzel Jakob
9883ec01d7
allow nullptr string values ( closes #138 )
2016-03-26 23:37:51 +01:00
Wenzel Jakob
d3349af48b
modularized logic in preceding change, fixed issue with char ( fixes #150 )
2016-03-26 23:04:10 +01:00
Wenzel Jakob
de1bca864e
added feature to pass void* pointers by popular demand
2016-03-26 17:51:09 +01:00