Skip to content

Commit 018acc7

Browse files
committed
Fix: use appropriate default value for seek mode.
1 parent bfea05d commit 018acc7

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ Object seek(VirtualFrame frame, PMMap self, long dist, Object how) {
613613
private int castToInt(Object val) {
614614
if (castToLongNode == null) {
615615
CompilerDirectives.transferToInterpreterAndInvalidate();
616-
castToLongNode = insert(CastToIndexNode.create());
616+
castToLongNode = insert(CastToIndexNode.create(PythonBuiltinClassType.TypeError, (obj) -> 0));
617617
}
618618
return castToLongNode.execute(val);
619619
}

0 commit comments

Comments
 (0)