[Python-Dev] MinGW And The other Py2.4 issue

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 13 23:17:51 CET 2004


Paul Moore wrote:
> My current technique for checking an extension is compatible with
> Python 2.4 is to run objdump -p (from the mingw distribution - use
> dumpbin /imports from MSVC) and review the import table. If any
> symbols are referenced from msvcrt.dll, you need to convince yourself
> that they are used solely by the mingw runtime startup code. 

I forgot the details of your analysis, but I think you are right.
However, I would feel more comfortable if only a single CRT was used
from an extension module.

As for creating a case that crashes if you mix CRTs: Just try
PyRun_SimpleFile in the extension, with a file that you fopen'ed
in the extension. Satisfy this fopen from, say, msvcrt.dll, and
load the extension into Python 2.4.

Regards,
Martin


More information about the Python-Dev mailing list