Re: [C++-sig] Sharing C++ data from different modules
by Ralf W. Grosse-Kunstleve other posts by this author
Oct 2 2003 6:19AM messages near this date
[C++-sig] Sharing C++ data from different modules
|
Re: [C++-sig] Sharing C++ data from different modules
--- Pierre Barbier de Reuille <pierre.barbier@[...].fr> wrote:
> I need to build a module for python that will be included in a broader
> application with contributions from different teams using different
> exporting tools (mainly SWIG or Boost.Python for C++ code, but sometimes
> the native C fonctions are used). As we need to share C++ structures, is
> there a way to define a function taking a PyObject* that returns a
> pointer to the corresponding C++ object. For example, if I have a class
> named "MyClass", I'd want to be able to write :
>
> MyClass* ptr = PyObjectToMyClass( py_object );
>
> Where py_object is a PyObject* known to correspond to a MyClass object
> exported using Boost.Python.
Is this what you are looking for?
http://www.boost.org/libs/python/doc/tutorial/doc/extracting_c___objects.html
http://www.boost.org/libs/python/doc/v2/extract.html
Ralf
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
Pierre Barbier de Reuille
Ralf W. Grosse-Kunstleve
Pierre Barbier de Reuille
|