[C++-sig] Sharing C++ data from different modules
by Pierre Barbier de Reuille other posts by this author
Oct 2 2003 4:34AM messages near this date
Re: [C++-sig] problem with Boost.Python enum with duplicate values
|
Re: [C++-sig] Sharing C++ data from different modules
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.
I hope I'm clear enough,
Thanks,
--
Pierre Barbier de Reuille
INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde
34398 MONTPELLIER CEDEX 5, France
tel : (33) 4 67 61 65 77 fax : (33) 4 67 61 56 68
_______________________________________________
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
|