Skip to content

Commit

Permalink
Use C++ conformant “_fileno” instead of “fileno”.
Browse files Browse the repository at this point in the history
  • Loading branch information
samhocevar committed Dec 12, 2018
1 parent 43970bb commit ab0ac86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/UnrealEnginePython/Private/UnrealEnginePython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ void FUnrealEnginePythonModule::StartupModule()
// Restore stdio state after Py_Initialize set it to O_BINARY, otherwise
// everything that the engine will output is going to be encoded in UTF-16.
// The behaviour is described here: https://bugs.python.org/issue16587
_setmode(fileno(stdin), O_TEXT);
_setmode(fileno(stdout), O_TEXT);
_setmode(fileno(stderr), O_TEXT);
_setmode(_fileno(stdin), O_TEXT);
_setmode(_fileno(stdout), O_TEXT);
_setmode(_fileno(stderr), O_TEXT);

// Also restore the user-requested UTF-8 flag if relevant (behaviour copied
// from LaunchEngineLoop.cpp).
Expand Down

0 comments on commit ab0ac86

Please sign in to comment.