Python 2.4.2 using msvcrt71.dll on Win and compatibility issues
Christoph Zwerschke
cito at online.de
Wed Feb 8 18:17:02 EST 2006
Martin v. Löwis wrote:
> Christoph Zwerschke wrote:
>> I think this would only shift the problem. Because then I would have to
>> convert the msvcr71 stream I get from Python to a msvcrt stream. Using
>> fileno() (of msvcrt) to get the file descriptor will probably not work.
>
> It actually would:
>
> #define _fileno(_stream) ((_stream)->_file)
>
> This definition is the same in all CRT version, plus the _file member
> is at the same offset in all CRT versions. Microsoft apparently wants
> to support linkage of object files build with one CRT version against
> a different CRT version.
>
> It *is* hacky, of course.
I see. So this approach could actually work. Thanks for the hint.
-- Christoph
More information about the Python-list
mailing list