Re: [pygccxml-development] [ANN] Py++ based ctypes code generator
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2009-01-21 06:48:38
|
On Tue, Jan 20, 2009 at 11:56 PM, Gustavo Carneiro <gjc...@gm...> wrote: > 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? No, you are right. I can continue the list: different version of the same compiler, memory management, exceptions and etc. * calling conventions - there is a lot of documentation, that explains it, so it should be possible * ABI - name mangling is different, but this problem is solved. Today pygccxml is able to read exported symbols from the .dll, .map or .so file and map it to the declaration. * vtable - reverse engineering should work. I believe that in simple case ( class A{}; class B : A{}, class C : B{} ) it should not be too difficult to reconstruct vtable. * ctypes will have to deal with different compilers and operating system * exceptions - it is possible to solve the problem on Windows, not sure about Linux * memory management is the complex and hard-to-solve issue > Not trying to put down your excellent work. The whole credit should go to Thomas Heller. > I am just trying to understand the limitations (which may or not matter). I understand. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |