Re: [C++-sig] virtual functions with default implementation

2015-08-17 Thread Nikolay Mladenov
If you export an abstract class, create an object from python and call its virtual from C++ it should not work without the default implementation. On Mon, Aug 17, 2015 at 8:03 AM, Stefan Seefeld wrote: > Hi, > > I'm reviewing the Boost.Python tutorial, and I'm stumbling over the > section on "Vi

Re: [C++-sig] Returning values to Python in C++ reference arguments

2015-05-25 Thread Nikolay Mladenov
You have to do something like that using namespace boost::python; BOOST_PYTHON_MODULE(my_module) { struct wrapper{ static tuple bar(Foo & f){ double a, b; f.bar(a,b); return make_tuple(a,b); } }; class_("Foo", init<>()) .def("bar"

Re: [C++-sig] LINK : fatal error LNK1181: cannot open input file 'python26_d.lib'

2014-05-14 Thread Nikolay Mladenov
May be remove the python debugging? On Tue, May 13, 2014 at 4:08 AM, Florian Maile wrote: > Hello, > > I’m really getting insane of building the tutorial. My steps were: > > >1. Unpacking the ZIP >2. Running bootstrap in the boost.python root directory >3. Configuration of user-conf

Re: [C++-sig] Exposing a generic template system in Boost.Python

2014-03-19 Thread Nikolay Mladenov
To add to Stefan's answer: I do the the same and also use visitors to add the same sets of members to classes, with possible customizations via trait classes. HTH On Wed, Mar 19, 2014 at 1:36 PM, Stefan Seefeld wrote: > Francesco, > > I have done something like what you are suggesting. It ess

Re: [C++-sig] getting the tutorial up and running

2014-03-04 Thread Nikolay Mladenov
ello_ext.pyd... > ...skipped hello for lack of > bug>hello_ext.pyd... > ...failed updating 3 targets... > ...skipped 3 targets... > > C:\local\boost_1_55_0\libs\python\example\tutorial> > > do I have to worry about link.jam? > > best, > > Kevin >

Re: [C++-sig] getting the tutorial up and running

2014-03-02 Thread Nikolay Mladenov
IIRC when you build boost you have to use --with-python as bjam option or the python libs are not built On Sat, Mar 1, 2014 at 6:30 PM, Kevin Kunzmann wrote: > Hi! > > I just successfully built boost using bootstrap and .\b2 on Windows 8.1 > with msvc 11.0. I put it in C:\local\boost_1_55_0 >

Re: [C++-sig] create a python object from scratch in boost.python?

2014-01-21 Thread Nikolay Mladenov
My be construct bp::object from the result of _PyObject_New? On Tue, Jan 21, 2014 at 8:29 AM, Gary Oberbrunner wrote: > > > - Original Message - > > From: "Neal Becker" > > To: cplusplus-sig@python.org > > Sent: Monday, January 20, 2014 8:39:55 PM > > Subject: Re: [C++-sig] create a py

Re: [C++-sig] memory leak with __iadd__

2013-09-27 Thread Nikolay Mladenov
if you .def ("test_iadd", &hist_t::operator+=, bp::return_self<>()) and you use it instead of += do you get the leak? On Thu, Sep 26, 2013 at 10:44 AM, Neal Becker wrote: > Nikolay Mladenov wrote: > > > On Wed, Sep 25, 2013 at 11:22 AM, Neal Becker > wrote:

Re: [C++-sig] memory leak with __iadd__

2013-09-26 Thread Nikolay Mladenov
On Wed, Sep 25, 2013 at 11:22 AM, Neal Becker wrote: > I've been trying to track down a memory leak. When I use the following: > > .def ("__iadd__", &hist_t::operator+=, bp::return_self<>()) > but this is no different then any other function def with return_self<> policy (which i do a lot)? wh

Re: [C++-sig] Boost.Python and STLPort, ArgumentError

2009-06-19 Thread Nikolay Mladenov
It looks like your Boost.Python requires rebuild with stlport? The error message comes from Boost.Python (function.cpp I think). It seems to me that your module is build with stlport but boost_python is not. HTH, Nikolay Simon Pickles wrote: Hello, Configuration: WinXP SP3 MSVC8 Python 2.5

Re: [C++-sig] C++ Signature

2008-11-18 Thread Nikolay Mladenov
T J wrote: For boost.python, the C++ signature is shown with a particular header [python/src/object/function_doc_signature.cpp]: char cpp_signature_tag[] = "C++ signature :"; To conform to a reST docstring format, I'd like to change it to: char cpp_signature_tag[] = "C++ signat