Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 510d08b

Browse files
committed
In the section on the "Very High Level Layer", address concerns brought up
by Edward K. Ream <[email protected]> about FILE* values and incompatible C libraries in dynamically linked extensions. It is not clear (to me) how realistic the issue is, but it is better documented than not. This closes SourceForge bug #111520.
1 parent b07cf50 commit 510d08b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Doc/api/api.tex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,15 @@ \chapter{The Very High Level Layer \label{veryhigh}}
597597
\constant{Py_file_input}, and \constant{Py_single_input}. These are
598598
described following the functions which accept them as parameters.
599599

600+
Note also that several of these functions take \ctype{FILE*}
601+
parameters. On particular issue which needs to be handled carefully
602+
is that the \ctype{FILE} structure for different C libraries can be
603+
different and incompatible. Under Windows (at least), it is possible
604+
for dynamically linked extensions to actually use different libraries,
605+
so care should be taken that \ctype{FILE*} parameters are only passed
606+
to these functions if it is certain that they were created by the same
607+
library that the Python runtime is using.
608+
600609
\begin{cfuncdesc}{int}{PyRun_AnyFile}{FILE *fp, char *filename}
601610
If \var{fp} refers to a file associated with an interactive device
602611
(console or terminal input or \UNIX{} pseudo-terminal), return the

0 commit comments

Comments
 (0)