Merge pull request #1124 from corona10/sys_maxunicode

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

No files matched your search

+1
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
+2 -1
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()),