There was an error while loading. Please reload this page.
2 parents 697d6ed + d562b02 commit cd415c6Copy full SHA for cd415c6
1 file changed
vm/src/sysmodule.rs
@@ -16,6 +16,8 @@ use crate::{builtins, exceptions, py_io, version};
16
/*
17
* The magic sys module.
18
*/
19
+const MAXSIZE: usize = std::isize::MAX as usize;
20
+const MAXUNICODE: u32 = std::char::MAX as u32;
21
22
fn argv(vm: &VirtualMachine) -> PyObjectRef {
23
vm.ctx.new_list(
@@ -656,8 +658,8 @@ settrace() -- set the global debug tracing function
656
658
"gettrace" => named_function!(ctx, sys, gettrace),
657
659
"hash_info" => hash_info,
660
"intern" => named_function!(ctx, sys, intern),
- "maxunicode" => ctx.new_int(std::char::MAX as u32),
- "maxsize" => ctx.new_int(std::isize::MAX),
661
+ "maxunicode" => ctx.new_int(MAXUNICODE),
662
+ "maxsize" => ctx.new_int(MAXSIZE),
663
"path" => path,
664
"ps1" => ctx.new_str(">>>>> "),
665
"ps2" => ctx.new_str("..... "),
0 commit comments