On Fri, Mar 15, 2013 at 12:54 PM, Neal Becker wrote:
> Jim Bosch wrote:
>
> > On 01/27/2013 05:02 AM, Michael Wild wrote:
> >> Hi all
> >>
> >> Is there a way to apply a CallPolicy to operator definitions? In
> >> particular, I'm in
Hi all
Is there a way to apply a CallPolicy to operator definitions? In
particular, I'm interested in the inplace operators (+=, -=, *=, /= and
friends).
To give a bit more context: The library I'm trying to wrap exposes some
static const objects. So far, I have been able to wrap modifying
functi
[re-post with the correct from-address, the original got rejected]
On 01/23/2013 07:08 PM, Michael Wild wrote:
> On 01/23/2013 07:03 PM, Jim Bosch wrote:
>> On 01/23/2013 12:56 PM, Michael Wild wrote:
>>
>>
>>
>>>
>>> Yes, I thought of that too. While
On 01/23/2013 07:03 PM, Jim Bosch wrote:
> On 01/23/2013 12:56 PM, Michael Wild wrote:
>
>
>
>>
>> Yes, I thought of that too. While this "solves" this case (it certainly
>> is not very discoverable for future maintainers), it does not help in
>>
On 01/23/2013 05:44 PM, Jim Bosch wrote:
> On 01/23/2013 12:34 AM, Michael Wild wrote:
>> On 01/22/2013 11:27 PM, Jim Bosch wrote:
>>> On 01/22/2013 04:18 PM, Michael Wild wrote:
>>>> Dear all
>>>>
>>>> I have defined a to_python converter f
On Wed, Jan 23, 2013 at 8:19 AM, salinea wrote:
>
> I create a pyd File named "testPyd" with boostPython,and then I import the
> testPyd module into "test.py", it works perfect!
> But when I embeded the python interpreter into my C++ project and run the
> "test.py", it comes out a "ImportErr: no
On 01/22/2013 11:27 PM, Jim Bosch wrote:
> On 01/22/2013 04:18 PM, Michael Wild wrote:
>> Dear all
>>
>> I have defined a to_python converter following
>> http://misspent.wordpress.com/2009/09/27/how-to-write-boost-python-converters.
>>
>> Everything is
Dear all
I have defined a to_python converter following
http://misspent.wordpress.com/2009/09/27/how-to-write-boost-python-converters.
Everything is fine and dandy, however what bugs me is having to specify
a return_value_policy() for every make_getter call.
Looking through the sources it seems th
.attr("static_a") = boost::ref(A::static_a); //no copy here
>
> regards
>
>
> 2013/1/16 Michael Wild :
>> Dear all
>>
>> I struggle to find a way in which I can wrap a static instance in a
>> bp::object without copying it. The goal is to have
Dear all
I struggle to find a way in which I can wrap a static instance in a
bp::object without copying it. The goal is to have object identity for
this static instance:
struct A {
/*...*/
static A static_a;
};
a A::a;
bp::object static_instance()
{
static bp::object* result = new bp::obj
On 01/31/2012 05:56 PM, Jim Bosch wrote:
> On 01/31/2012 12:41 AM, Michael Wild wrote:
>> On 01/30/2012 07:28 PM, Jim Bosch wrote:
>>> On 01/30/2012 12:11 PM, Michael Wild wrote:
>>>> That's what I've been referring to as "auxiliary" functions.
On 01/30/2012 07:28 PM, Jim Bosch wrote:
> On 01/30/2012 12:11 PM, Michael Wild wrote:
>> That's what I've been referring to as "auxiliary" functions. If
>> possible, I'd like to avoid them because I don't fancy writing hundreds
>> of those... I
On 01/30/2012 04:58 PM, Jim Bosch wrote:
> On 01/30/2012 09:32 AM, Michael Wild wrote:
>> Hi all
>>
>> I can't seem to figure out how to wrap this in Boost.Python without the
>> need for auxiliary functions:
>>
>
>
>
>>string& s()
Hi all
I can't seem to figure out how to wrap this in Boost.Python without the
need for auxiliary functions:
#include
#include
using std::string;
using namespace boost::python;
class A
{
string m_s;
public:
A(string const& s) : m_s(s) {}
// read-only access (
string const& s() const
Hi all
I'm fairly new to Boost.Python and currently I'm looking for a convenient way
of adding docstrings to overloaded operators, e.g:
class A;
class B
A operator+(A const&, A const&);
B operator+(B const&, B const&);
BOOST_PYTHON_MODULE(foo) {
bp::class_("A")
.def(self + self) //< How to a
15 matches
Mail list logo