[Python-Dev] PyRun_* functions

wesley henwood wesleyhenwood@hotmail.com
Thu, 24 Apr 2003 19:41:48 +0000

Quote from py docs:
"Note also that several of these functions take FILE* parameters. On 
particular issue which needs to be handled carefully is that the FILE 
structure for different C libraries can be different and incompatible. Under 
Windows (at least), it is possible for dynamically linked extensions to 
actually use different libraries, so care should be taken that FILE* 
parameters are only passed to these functions if it is certain that they 
were created by the same library that the Python runtime is using."

How does one do this - make sure that they were created with the same lib?

Its seems that it would be a good enhancement to remove the FILE pointer 
parameter from these functions, and just use the file name.  For example, 
change PyRun_SimpleFile( FILE *fp, char *filename) to PyRun_SimpleFile(char 
*filename). Then no one would have to worry about the incompatibility.