@@ -930,17 +930,17 @@ public abstract static class OpenNode extends PythonFileNode {
930
930
private final BranchProfile gotException = BranchProfile .create ();
931
931
932
932
@ Specialization (guards = {"isNoValue(mode)" , "isNoValue(dir_fd)" })
933
- Object open (VirtualFrame frame , Object pathname , int flags , @ SuppressWarnings ("unused" ) PNone mode , PNone dir_fd ,
933
+ Object open (VirtualFrame frame , Object pathname , long flags , @ SuppressWarnings ("unused" ) PNone mode , PNone dir_fd ,
934
934
@ Cached CastToPathNode cast ) {
935
935
return openMode (frame , pathname , flags , 0777 , dir_fd , cast );
936
936
}
937
937
938
938
@ Specialization (guards = {"isNoValue(dir_fd)" })
939
- Object openMode (VirtualFrame frame , Object pathArg , int flags , int fileMode , @ SuppressWarnings ("unused" ) PNone dir_fd ,
939
+ Object openMode (VirtualFrame frame , Object pathArg , long flags , long fileMode , @ SuppressWarnings ("unused" ) PNone dir_fd ,
940
940
@ Cached CastToPathNode cast ) {
941
941
String pathname = cast .execute (frame , pathArg );
942
- Set <StandardOpenOption > options = flagsToOptions (flags );
943
- FileAttribute <Set <PosixFilePermission >>[] attributes = modeToAttributes (fileMode );
942
+ Set <StandardOpenOption > options = flagsToOptions (( int ) flags );
943
+ FileAttribute <Set <PosixFilePermission >>[] attributes = modeToAttributes (( int ) fileMode );
944
944
try {
945
945
SeekableByteChannel fc ;
946
946
TruffleFile truffleFile = getContext ().getPublicTruffleFileRelaxed (pathname , PythonLanguage .DEFAULT_PYTHON_EXTENSIONS );
0 commit comments