[Python-Dev] Linking with mscvrt

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Feb 9 04:27:50 CET 2006

Neil Hodgson wrote:

>   You don't need to drop the CRT, just encapsulate it so there is one
> copy controlled by Python that hands out wrapped objects (file
> handles, file pointers, memory blocks, others?). These wrappers can
> only be manipulated through calls back to that owning code that then
> calls the CRT.

But that won't help when you need to deal with third-party
code that knows nothing about Python or its wrapped file
objects, and calls the CRT (or one of the myriad extant
CRTs, chosen at random:-) directly.

I can't see *any* solution to this that works in general.
Even if Python itself and all its extensions completely
avoid using the CRT, there's still the possibility that
two different extensions will use two third-party libraries
that were compiled with different CRTs.

As far as I can see, Microsoft have created an intractable
mess here. Their solution of "compile your whole program
with the same CRT" completely misses the possibility that
the "whole program" may consist of disparate separately-
written and separately-compiled parts, and there may be no
single person with the ability and/or legal right to
compile and link the whole thing.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiam!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list