2009/1/20 Roman Yakovenko <roman.yakovenko@gmail.com>
On Tue, Jan 20, 2009 at 9:22 PM, Gustavo Carneiro <gjcarneiro@gmail.com> wrote:
> This is potentially very useful!  Generated Python code can be shipped with
> any project and is (almost) platform independent without need for
> compilation; you just run Python code.

This is my goal :-)

> However I have to wonder how (if) do you support C++ calling conventions.

I think, I was not clear. You can compile C code using C and/or C++
compiler. Py++ supports both modes. In the second mode the calling
convention is same as in C, but name mangling is different

> Things like:
>    - How to pass the 'this' parameter to call methods;
>    - Function/method overloading.
>
> I have followed the path of C++ code generation precisely because of the
> difficulty of calling C++ code via libffi, or else I would probably have
> contributed to the gobject-introspection and pybank projects.  I thought
> ctypes did not support C++?

Just read few mails, with ctypes-cpp in the subject:
http://sourceforge.net/mailarchive/forum.php?forum_name=ctypes-users

and take a look on easybmp example(
http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/examples/pyeasybmp_dev/ctypes/
)

I still don't understand one thing.  As far as I know, there is no standard C++ ABI, and no standard calling convention for C++ methods, no standard layout for class vtable; all those things are compiler dependent.  So, if your code works with MSVC, it may not work with GCC, or vice-versa.  Am I wrong?

Not trying to put down your excellent work.  I am just trying to understand the limitations (which may or not matter).

Thanks in advance,

--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert