[Python-Dev] Include C++ code in the ctypes test suite?

Christian Heimes lists at cheimes.de
Thu Jan 29 17:46:04 CET 2009


Thomas Heller schrieb:
> To test this functionality it is required to add some C++ source code to the
> ctypes private test module _ctypes_test.pyd/_ctypes_test.so.
> 
> Is it appropriate to add C++ source files to the Python repository,
> or would that create too much trouble on some platforms?

How about creating an additional test library ctypes_test_cpp.cpp? This
way we can still run the ctypes tests on a platform without a C++
compiler. Of course you could add some preprocessor magic but that's
just another way to ask for trouble. A second test library should make
it easier.

Christian



More information about the Python-Dev mailing list