Merge pull request #1124 from corona10/sys_maxunicode

sys: Fix sys.maxsize and add sys.maxunicode
This commit is contained in:
Windel Bouwman
2019-07-09 20:33:09 +02:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -20,3 +20,4 @@ assert isinstance(sys.flags, tuple)
assert type(sys.flags).__name__ == "flags"
assert type(sys.flags.optimize) is int
assert sys.flags[3] == sys.flags.optimize
assert sys.maxunicode == 1114111

View File

@@ -256,7 +256,8 @@ settrace() -- set the global debug tracing function
"getfilesystemencoding" => ctx.new_rustfunc(sys_getfilesystemencoding),
"getfilesystemencodeerrors" => ctx.new_rustfunc(sys_getfilesystemencodeerrors),
"intern" => ctx.new_rustfunc(sys_intern),
"maxsize" => ctx.new_int(std::usize::MAX),
"maxunicode" => ctx.new_int(0x0010_FFFF),
"maxsize" => ctx.new_int(std::isize::MAX),
"path" => path,
"ps1" => ctx.new_str(">>>>> ".to_string()),
"ps2" => ctx.new_str("..... ".to_string()),