This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Simple File fix for Windows Runtime incompatability
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, loewis, mdjeremy, tim.peters
Priority: normal Keywords: patch

Created on 2004-08-04 20:17 by mdjeremy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
win_runtime_patch_c.diff mdjeremy, 2004-08-04 20:20 Context diff of the two changes
Messages (4)
msg46526 - (view) Author: Jeremy Schwartz (mdjeremy) Date: 2004-08-04 20:17

PyRun_SimpleFile - Using this function on Windows with
MSVC7 (VS .NET) causes a crash.


1)Pre built binaries link to msvcrt.dll. New version of
MSVC link to msvcrt71.dll. The FILE structure is
different across the two versions of runtime library. 

2) If python23.dll is rebuilt using the latest binary,
and issue exist where passing in FILE * still causes
the runtime library to throw an exception due to
running in the dll's context.


Remove both of these problems by adding a new function
that only takes the filename (future maybe fopen flags)
and have the dll open the file itself and pass it on.

New function added to pythonrun.c and pythonrun.h

PyRun_SimpleFileWithOpen(const char *filename)

Takes just the file name, opens the file and then pass
it on.
msg46527 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-08-09 00:40
Logged In: YES 

There appear to be all sorts of things in the patch that don't 
have anything to do with the new function.  Is that 
msg46528 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-08-26 21:57
Logged In: YES 

I would like to see the following changes to the patch:
- remove all parts that are not strictly relevant (IOW, make
it minimal)
- call the function PyRun_SimpleFileName
- Add a PyCompilerFlags*. If you want to, you can allow this
argument to be NULL.
- Add a PyRun_SimpleParseFileName parallel function, and
  (i.e. all File APIs except for Any, which supports
terminals and is irrelevant here)
- Provide documentation patches as well.

Are you willing to carry out these changes?
msg61340 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-01-20 19:24
We are using VS 2008 now and we don't support mixing multiple CRTs. If
you still want to get your patch into Python 2.6 create a new issue with
a clean patch.
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40687
2008-01-20 19:24:02christian.heimessetstatus: open -> closed
nosy: + christian.heimes
resolution: out of date
messages: + msg61340
2004-08-04 20:17:51mdjeremycreate