2009/1/20 Roman Yakovenko <firstname.lastname@example.org>
This is my goal :-)
On Tue, Jan 20, 2009 at 9:22 PM, Gustavo Carneiro <email@example.com
> 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.
I think, I was not clear. You can compile C code using C and/or C++
> However I have to wonder how (if) do you support C++ calling conventions.
compiler. Py++ supports both modes. In the second mode the calling
convention is same as in C, but name mangling is different
Just read few mails, with ctypes-cpp in the subject:
> 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++?
and take a look on easybmp example(
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?