Wenzel Jakob
d33361a6d7
moved lifetime management of Py_buffer to pybind11::buffer_info, renamed count->size to match NumPy naming ( fixes #34 )
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
2ca07de83c
minor fix for PYBIND11_OBJECT_CVT
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
f08a3f0622
Merge pull request #52 from tmiasko/const-correctness
...
Make handle and related classes const correct.
2016-01-10 21:34:55 +01:00
Tomasz Miąsko
ca77130be8
Use object class to hold partially converted python objects.
...
Using object class to hold converted object automatically deallocates
object if an exception is thrown or scope is left before constructing
complete Python object.
Additionally added method object::release() that allows to release
ownership of python object without decreasing its reference count.
2016-01-02 21:07:18 +01:00
Tomasz Miąsko
875df5528d
Make handle and related classes const correct.
...
This gives handle classes a typical pointer semantics with respects to
constness.
2015-12-28 08:11:16 +01:00
Wenzel Jakob
45f7c65594
Merge pull request #50 from tmiasko/handle_cast_const
...
Add const modifier to handle::cast.
2015-12-27 17:29:24 +01:00
Tomasz Miąsko
c83e062263
Create an empty python tuple in pybind::tuple default constructor.
...
Follow the same semantics as constructors of dict, list, and set by
creating valid Python object in default constructor of a tuple class.
2015-12-27 09:05:25 +01:00
Tomasz Miąsko
cc39b2f37f
Add const modifier to handle::cast.
2015-12-26 19:01:28 +01:00
Wenzel Jakob
d1a24823bc
considerable simplifications to the Python type casters
2015-12-16 12:17:46 +01:00
Wenzel Jakob
60c36db1c9
generic integer type handling
2015-11-30 12:45:34 +01:00
Wenzel Jakob
7f8d1c20f1
improved int_ constructor
2015-11-29 13:48:16 +01:00
Wenzel Jakob
4ee0f2a19e
add missing instructor for bool_
2015-11-29 13:47:10 +01:00
Wenzel Jakob
e1b113b0d9
ifdef WIN32 -> _WIN32
2015-11-28 14:20:38 +01:00
Wenzel Jakob
eb7c0b82ec
functional.h: support more kinds of Python functions
2015-11-16 18:39:43 +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
3419ee909f
fix linux 32 bit builds
2015-10-21 11:07:48 +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