brad wrote:
RPM1 wrote:
...
Basically you just compile your C code as a regular C code dll. ctypes then allows you to access the functions in the dll very easily.

Does that work with C++ code too or just C?

On Windows, You can apparently works either with stdcall or cdecl functions.
"ctypes tries to protect you from calling functions with the wrong number of arguments or the wrong calling convention. Unfortunately this only works on Windows. It does this by examining the stack after the function returns, so although an error is raised the function has been called:" "To find out the correct calling convention you have to look into the C header file or the documentation for the function you want to call." I do not know if these are only C-isms or also C++-isms.


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to