Message349598
Because FILE* requires that the runtime library matches between Python and a program using it, it is very hard to use this correctly on Windows. It would be nice if Python provided either:
- A function to open a FILE* given a filename, suitable for passing to the various PyRun_* functions, or
- Versions of the functions that take a filename and internally open the file
(ref: https://docs.python.org/3.9/c-api/veryhigh.html, which talks about this but provides no useful guidance:
"One 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."
) |
|
Date |
User |
Action |
Args |
2019-08-13 18:21:40 | cbiesinger | set | recipients:
+ cbiesinger, paul.moore, tim.golden, zach.ware, steve.dower |
2019-08-13 18:21:40 | cbiesinger | set | messageid: <1565720500.55.0.0348058431334.issue37844@roundup.psfhosted.org> |
2019-08-13 18:21:40 | cbiesinger | link | issue37844 messages |
2019-08-13 18:21:40 | cbiesinger | create | |
|