471,624 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Assigning pointer to PySwigObject in Boost

Hi all

I'm working with Boost.Python at the moment and have to do the
following:
-Using Boost, assign a char* in C++ to a PySwigObject (SWIG exposed
object) of type uchar*, which is received in C++ as a
boost::python::object class.

The uchar* pointer in the PySwigObject points to a buffer containing
image data. All I wish to do is assign a C++ pointer that is also
pointing to a buffer with image data to the PySwigObject pointer and
send it back to Python. The PySwigObject is part of the CvMat class
used with OpenCV for image-processing in Python. It is already wrapped
in SWIG, so I CANNOT change it. I've already been to the python Wiki
that explains how to extract SWIG exposed pointers in python (http://
wiki.python.org/moin/boost.python/HowTo), but this does NOT tell me
how to do the opposite: assigning C++ pointers to SWIG exposed
pointers with Boost.

Any tips or tricks to get this working?

Thanks

Will

Feb 5 '07 #1
0 1297

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

37 posts views Thread by Ben | last post: by
11 posts views Thread by Enquiries, Hopkins Research | last post: by
17 posts views Thread by Divick | last post: by
33 posts views Thread by Ney André de Mello Zunino | last post: by
3 posts views Thread by .rhavin grobert | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.