Ah, I see! That does the trick! Thank you very much. I was clearly
confused about what "caller_owns_return" meant -- I had it backwards.
Mike.
On Jun 22, 2009, at 5:11 PM, Gustavo Carneiro wrote:
2009/6/22 J. Michael Owen
I'm looking at wrapping a C++ singleton with pybindgen, and it
2009/6/22 J. Michael Owen
> I'm looking at wrapping a C++ singleton with pybindgen, and it seems that
> if I expose the method for getting the instance to python the generated code
> wants to call a copy constructor, which seems wrong to me. If for instance
> I define a class "A" as a singleton:
I'm looking at wrapping a C++ singleton with pybindgen, and it seems
that if I expose the method for getting the instance to python the
generated code wants to call a copy constructor, which seems wrong to
me. If for instance I define a class "A" as a singleton:
class A {
public:
static
Thanks!
I'm trying to create an interface for a third party library, so I
can't actually change it. I also tried using ctypes.pointer but didn't
work either. I'll probably need to create a wrapper that does the type
conversion.
Thanks again Renato!
If anyone knows how to make it work with wchar_t*
Hi Nicolas
At my first look I get this working changing the register function:
<< to_python_converter();
>> to_python_converter();
<< static PyObject* convert(wchar_t* const& w)
>> static PyObject* convert(wchar_t const& w)
<> w
Hi Renato,
Thanks for the reply. Here's some test code. (I pasted it to make it
more friendly =)
http://paste.pocoo.org/show/124521/
Testing it in python: http://paste.pocoo.org/show/124523/
Thanks in advance!
Best Regards
For the archives:
=== test.cpp
#include "CLucene.h"
#include
#include
Hi Nicolas,
Can you send a simple example, where the convention fail (c++ to
python or python to c++)? What kind of test you are running?
BR
Renato
On Mon, Jun 22, 2009 at 8:31 AM, Nicolas Lara wrote:
> Hello,
> I'm new to Boost::Python and am encountering a problem that seem to be
> quite co
Hello,
I'm new to Boost::Python and am encountering a problem that seem to be
quite common: I need to expose a class to C++ whose constructor takes
a wchar_t* as a parameter.
The problem is that there is no default type converter from wchar_t to
python and vice-versa.
I wanted to know if there was
Hi,
I am trying to use boost.python to wrap some classes in an
application, and have python embedded in my app and make some
instances from the application accessible thru simple script.
I got the impression that with boost python it should be quite simple
for basics, but I cannot have a simple cod
On Mon, Jun 22, 2009 at 09:52:35AM +0300, Jesse Lehrman wrote:
> It seems that most of the exports in the 32-bit version have a preceding
> underscore while in the 64-bit version they don't. For example:
>
> python25.lib 32-bit:
> _PyFloat_AsDouble
>
> python25.lib 64-bit:
>
10 matches
Mail list logo