Thanks Nicolas,
I learnt a lot from your way of doing it!
Simon
On 13/01/2010 11:17, Nicolas Lelong wrote:
Simon,
it seems that I wrapped the same videoinput library you're using.
I wrapped the getPixels the following way : python script is
responsible of the memory allocation for pixels bu
Simon,
it seems that I wrapped the same videoinput library you're using.
I wrapped the getPixels the following way : python script is responsible
of the memory allocation for pixels buffer (in a correctly sized string).
The getPixels function is wrapped as follows :
namespace {
bool video
On Wed, Jan 13, 2010 at 11:00 AM, Simon Pickles
wrote:
> Hello,
>
> I wonder if someone could help me with a tricky conversion between c++ and
> python types (well, tricky for me!)
>
> I have a c++ library that I would like to use in python via Boost::Python
>
> One function fills a c++ unsigned c
Hello,
I wonder if someone could help me with a tricky conversion between c++
and python types (well, tricky for me!)
I have a c++ library that I would like to use in python via Boost::Python
One function fills a c++ unsigned char* buffer. It has two overloads:
unsigned char * getPixe
you are right, that was silly.
thanks a lot
2008/12/12 Hans Meine
> On Thursday 11 December 2008 16:29:34 Luca Sbardella wrote:
> > The error I get is
> > *error C2668: 'boost::python::make_tuple' : ambiguous call to overloaded
> > function
> > could be 'boost::python::tuple boost::python::make_
On Thursday 11 December 2008 16:29:34 Luca Sbardella wrote:
> The error I get is
> *error C2668: 'boost::python::make_tuple' : ambiguous call to overloaded
> function
> could be 'boost::python::tuple boost::python::make_tuple<_Ty1,_Ty2>(const
> A0 &,const A1 &)'**
> or 'boost::tuples::tuple
>
I substituted the convert method in pair_to_tuple with the following
static PyObject* convert(ctype const& v) {
using namespace boost::python;
list values;
values.append(v.first);
values.append(v.second);
return incref(tuple(values)
My authomatic conversion function from std::pair does not work when one of
the pair type is a boost::python::object.
Template for conversion
template
struct pair_to_tuple {
typedef pair_to_tuple converter;
typedef std::pair ctype;
static PyObject* convert(ctype const& v) {
using namespace boos