[Python-Dev] Linking with mscvrt

"Martin v. Löwis" martin at v.loewis.de
Thu Feb 9 17:34:57 CET 2006


Neil Hodgson wrote:
>    The postgres example is strange to me as I'd never consider passing
> a FILE* over a DLL boundary. Maybe this is a Unix/Windows cultural
> thing due to such practices being more dangerous on Windows.

In the specific example, Postgres has a PQprint function that can
print a query result to a file; the file was sys.stdout.

>>Also, there is still the redistribution issue: to redistribute
>>msvcr71.dll, you need to own a MSVC license. People that want to
>>use py2exe (or some such) are in trouble: they need to distribute
>>both python25.dll, and msvcr71.dll. They are allowed to distribute
>>the former, but (formally) not allowed to distribute the latter.
> 
> 
>    Link statically.

Not sure whether this was a serious suggestion. If pythonxy.dll
was statically linked, you would get all the CRT duplication
already in extension modules. Given that there are APIs in Python
where you have to do malloc/free across the python.dll
boundary, you get memory leaks.

Regards,
Martin


More information about the Python-Dev mailing list