469,271 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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 1237

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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.