Skip to content

Commit a04afa8

Browse files
committed
Add 'mmap.flush'.
1 parent 54933e1 commit a04afa8

File tree

1 file changed

+12
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/mmap

1 file changed

+12
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/mmap/MMapBuiltins.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ protected static SequenceStorageNodes.AppendNode createAppend() {
517517
}
518518
}
519519

520-
@Builtin(name = "seek", fixedNumOfPositionalArgs = 1)
520+
@Builtin(name = "seek", minNumOfPositionalArgs = 2, maxNumOfPositionalArgs = 3)
521521
@GenerateNodeFactory
522522
@TypeSystemReference(PythonArithmeticTypes.class)
523523
abstract static class SeekNode extends PythonBuiltinNode {
@@ -703,4 +703,15 @@ public static InternalLenNode create() {
703703
}
704704
}
705705

706+
@Builtin(name = "flush", fixedNumOfPositionalArgs = 1)
707+
@GenerateNodeFactory
708+
abstract static class FlushNode extends PythonUnaryBuiltinNode {
709+
710+
@Specialization
711+
Object seek(@SuppressWarnings("unused") PMMap self) {
712+
return PNone.NONE;
713+
}
714+
715+
}
716+
706717
}

0 commit comments

Comments
 (0)