@@ -2938,28 +2938,30 @@ Py_Exit(int sts)
29382938int
29392939Py_FdIsInteractive (FILE * fp , const char * filename )
29402940{
2941- if (isatty (( int ) fileno (fp )))
2941+ if (isatty (fileno (fp ))) {
29422942 return 1 ;
2943- if (!Py_InteractiveFlag )
2943+ }
2944+ if (!_Py_GetConfig ()-> interactive ) {
29442945 return 0 ;
2945- return (filename == NULL ) ||
2946- (strcmp (filename , "<stdin>" ) == 0 ) ||
2947- (strcmp (filename , "???" ) == 0 );
2946+ }
2947+ return ((filename == NULL )
2948+ || (strcmp (filename , "<stdin>" ) == 0 )
2949+ || (strcmp (filename , "???" ) == 0 ));
29482950}
29492951
29502952
29512953int
29522954_Py_FdIsInteractive (FILE * fp , PyObject * filename )
29532955{
2954- if (isatty (( int ) fileno (fp ))) {
2956+ if (isatty (fileno (fp ))) {
29552957 return 1 ;
29562958 }
2957- if (!Py_InteractiveFlag ) {
2959+ if (!_Py_GetConfig () -> interactive ) {
29582960 return 0 ;
29592961 }
2960- return (filename == NULL ) ||
2961- (PyUnicode_CompareWithASCIIString (filename , "<stdin>" ) == 0 ) ||
2962- (PyUnicode_CompareWithASCIIString (filename , "???" ) == 0 );
2962+ return (( filename == NULL )
2963+ || (PyUnicode_CompareWithASCIIString (filename , "<stdin>" ) == 0 )
2964+ || (PyUnicode_CompareWithASCIIString (filename , "???" ) == 0 ) );
29632965}
29642966
29652967
0 commit comments