@@ -2938,28 +2938,30 @@ Py_Exit(int sts)
2938
2938
int
2939
2939
Py_FdIsInteractive (FILE * fp , const char * filename )
2940
2940
{
2941
- if (isatty (( int ) fileno (fp )))
2941
+ if (isatty (fileno (fp ))) {
2942
2942
return 1 ;
2943
- if (!Py_InteractiveFlag )
2943
+ }
2944
+ if (!_Py_GetConfig ()-> interactive ) {
2944
2945
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 ));
2948
2950
}
2949
2951
2950
2952
2951
2953
int
2952
2954
_Py_FdIsInteractive (FILE * fp , PyObject * filename )
2953
2955
{
2954
- if (isatty (( int ) fileno (fp ))) {
2956
+ if (isatty (fileno (fp ))) {
2955
2957
return 1 ;
2956
2958
}
2957
- if (!Py_InteractiveFlag ) {
2959
+ if (!_Py_GetConfig () -> interactive ) {
2958
2960
return 0 ;
2959
2961
}
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 ) );
2963
2965
}
2964
2966
2965
2967
0 commit comments