Commit Graph

145 Commits

Author SHA1 Message Date
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
Wenzel Jakob
eda978e003 support for opaque types 2016-03-15 15:07:55 +01:00
Ben Pritchard
1b52246f5d Better testing for callable python functions 2016-03-10 16:31:38 -05:00
Wenzel Jakob
17cdb06c1b fix severe regression involving character arrays (fixes #137) 2016-03-10 13:24:10 +01:00
Wenzel Jakob
eb5277b38e Merge pull request #119 from SylvainCorlay/docstring
Signature formatting for sphinx
2016-03-09 16:37:44 +01:00
Sylvain Corlay
4c7bf9bb94 Add return type 2016-03-08 18:44:04 -05:00
Sylvain Corlay
13b22bf4f6 Signature formatting for sphinx 2016-03-08 16:06:05 -05:00
Wenzel Jakob
81dfd2c51f Working type casters for wide strings and wide characters 2016-03-08 20:48:07 +01:00
Wenzel Jakob
4a50fa5cd4 Address issue with handle::cast<bool>(), quench warning in example 12 (fixes #110) 2016-02-23 23:51:01 +01:00
jmabille
9cfa71f411 Example of bug in functions returning bool overriden in python 2016-02-23 23:48:05 +01:00
Wenzel Jakob
57b52798e2 fixed run_test script 2016-02-20 21:19:30 +01:00
Wenzel Jakob
80c2451ac5 use relaxed testing scheme for MSVC and the intel compiler (they miss some RV optimizations) 2016-02-20 20:53:10 +01:00
Johan Mabille
1dc960c37f NumPy-style broadcasting support in pybind11::vectorize 2016-02-20 12:14:52 +01:00
Wenzel Jakob
10c74c6f34 transparent std::array conversion (fixes #97) 2016-02-07 16:36:51 +01:00
Wenzel Jakob
a65017902e set __module__ attribute of functions (fixes #95) 2016-02-04 23:03:58 +01:00
Wenzel Jakob
15f6a0030e enum comparison and conversion operations (closes #80) 2016-01-24 14:05:12 +01:00
Wenzel Jakob
48548ea4a5 general cleanup of the codebase
- new pybind11::base<> attribute to indicate a subclass relationship
- unified infrastructure for parsing variadic arguments in class_ and cpp_function
- use 'handle' and 'object' more consistently everywhere
2016-01-17 22:31:15 +01:00
Wenzel Jakob
9180519d8c added an example on using fancier kinds of default arguments 2016-01-17 22:31:15 +01:00
Wenzel Jakob
53b26549d0 python 3.2 compatiblity (closes #56) 2016-01-17 22:31:15 +01:00
Wenzel Jakob
678d787ca4 do more work with classes from pytypes.h (especially for STL container casting) 2016-01-17 22:31:15 +01:00
Wenzel Jakob
b2c2c79240 improved handling of shared/smart pointers
Previously, pybind11 required classes using std::shared_ptr<> to derive
from std::enable_shared_from_this<> (or compilation failures would ensue).

Everything now also works for classes that don't do this, assuming that
some basic rules are followed (e.g. never passing "raw" pointers of
instances manged by shared pointers). The safer
std::enable_shared_from_this<> approach continues to be supported.
2016-01-17 22:31:15 +01:00
Wenzel Jakob
5f218b3f2c keep_alive call policy (analogous to Boost.Python's with_custodian_and_ward, fixes #62) 2016-01-17 22:31:15 +01:00
Wenzel Jakob
82ffd40870 type of void fixed (None -> NoneType) 2016-01-17 22:31:15 +01:00
Wenzel Jakob
27e8e1066b added new type pybind11::bytes, cleanup of various macros (fixes #49) 2016-01-17 22:31:15 +01:00
Wenzel Jakob
66c9a40213 Much more efficient generation of function signatures, updated docs
This modification taps into some newer C++14 features (if present) to
generate function signatures considerably more efficiently at compile
time rather than at run time.

With this change, pybind11 binaries are now *2.1 times* smaller compared
to the Boost.Python baseline in the benchmark. Compilation times get a
nice improvement as well.

Visual Studio 2015 unfortunately doesn't implement 'constexpr' well
enough yet to support this change and uses a runtime fallback.
2016-01-17 22:31:15 +01:00
mk kim
b62c1203f5 Fix typographical error 2015-12-14 16:00:58 +09:00
Wenzel Jakob
76269b70b6 fix test harness for windows debug builds 2015-12-13 11:33:41 +01:00
Wenzel Jakob
60c36db1c9 generic integer type handling 2015-11-30 12:45:34 +01:00
Wenzel Jakob
6e213c9ca0 improved shared pointer support (fixes #14) 2015-11-24 23:18:32 +01:00
Wenzel Jakob
3ee91b2f0a renamed pybind11::set::insert -> add to match C api naming 2015-11-15 13:03:07 +01:00
Wenzel Jakob
333e889ef2 Improved STL support, support for std::set 2015-11-14 19:04:49 +01:00
Wenzel Jakob
fab881caf4 appveyor CI script 2015-10-18 18:01:33 +02:00
Wenzel Jakob
b1b714023a consistent macro naming throughout the project 2015-10-18 16:48:30 +02:00
Wenzel Jakob
8f4eb00690 last breaking change: be consistent about the project name 2015-10-15 18:23:56 +02:00
Wenzel Jakob
607654f7ec windows fixes 2015-10-13 23:58:10 +02:00
Wenzel Jakob
db028d685c added module::import statement 2015-10-13 23:44:25 +02:00
Wenzel Jakob
b50872acf2 A few breaking changes for consistency just before the 1.0 release
1. Renamed PYTHON_* to PYBIND_* everywhere

2. Renamed pybind::array_dtype<> to pybind::array_t<>
2015-10-13 17:46:31 +02:00
Wenzel Jakob
19208fe9a4 install a cleanup handler for nontrivial lambda closures 2015-10-13 17:46:27 +02:00
Wenzel Jakob
3b806d41eb Added configuration files for Travis CI integration 2015-10-11 18:31:46 +02:00
Wenzel Jakob
2cf192f578 fixed testcase to take enum->int conversion into account 2015-10-04 15:17:12 +02:00
Wenzel Jakob
6d6fd099db fixed testing infrastructure 2015-10-01 17:34:26 +02:00
Wenzel Jakob
be0e834b82 updated reference output 2015-10-01 17:13:38 +02:00
Wenzel Jakob
a2f6fde0dc support for overriding virtual functions 2015-10-01 17:13:35 +02:00
Wenzel Jakob
73a50a0441 Fix for radd/rsub/rmul/rdiv operator convenience wrappers 2015-09-11 17:09:47 +02:00
Wenzel Jakob
5116b02e68 python 2.7 fix 2015-09-05 02:14:39 +02:00
Wenzel Jakob
570822102c support for ancient Python versions (2.7.x) 2015-09-04 23:49:23 +02:00
Wenzel Jakob
d557e1d3ad example6 fix 2015-09-01 22:56:40 +02:00
Wenzel Jakob
7b8e032c26 added a few basic number types 2015-08-28 17:49:15 +02:00
Wenzel Jakob
281aa0e668 nicer code separation, cleanup logic, std::function type caster 2015-07-31 04:10:38 +02:00
Wenzel Jakob
a576e6a8ca keyword argument support, removed last traces of std::function<> usage 2015-07-29 23:39:11 +02:00
Wenzel Jakob
43398a8548 complex number support 2015-07-28 16:12:20 +02:00
Wenzel Jakob
d4258bafef generate more compact binaries 2015-07-28 03:10:15 +02:00
Wenzel Jakob
38bd71134a Initial commit 2015-07-09 15:27:32 +02:00