[Numpy-discussion] Compile Numpy in VC++8

Robert Kern robert.kern@gmail....
Thu Apr 3 16:59:58 CDT 2008

On Thu, Apr 3, 2008 at 4:52 PM, Chris Barker <Chris.Barker@noaa.gov> wrote:
> Robert Kern wrote:
>  Just since that has been discussed a LOT, for years, I want to be clear:
>  > Different versions of Microsoft's compiler use different libraries for
>  > the standard C library. Some simple Python extension modules compiled
>  > with a different compiler than the Python interpreter will usually
>  > work.
>  Do SOME modules USUALLY work just because of what routines in the
>  standard library they happen to call? So it's just a matter of luck that
>  a given module may not trigger a conflict between the two runtime libs?

It is usually a matter of communication between the two systems. If an
extension module with C runtime (CRT) A allocates some memory with its
malloc() then passes it to the Python interpreter which tries to free
it with CRT B's free() function, you will have problems. Similarly,
FILE* pointers are frequent causes of problems in this regard.
However, if nothing crosses the boundary between the two CRT's, there
will (usually) be no problem. The failure will be deterministic, but
possibly only a subset of the API of the extension module will
exercise the failure mode.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

More information about the Numpy-discussion mailing list