Commit a11792bd authored by Boxiang Sun's avatar Boxiang Sun

Add ignore_enviroment attribute to sys.flags

Pyston already has Py_IgnoreEnvironmentFlag, just add it to sys.flags.
parent bd338c96
......@@ -816,6 +816,8 @@ void setupSys() {
sys_flags_cls->giveAttr(
"__new__", new BoxedFunction(FunctionMetadata::create((void*)BoxedSysFlags::__new__, UNKNOWN, 1, true, true)));
sys_flags_cls->tp_dealloc = (destructor)BoxedSysFlags::dealloc;
sys_flags_cls->giveAttr("ignore_environment", boxInt(Py_IgnoreEnvironmentFlag));
#define ADD(name) sys_flags_cls->giveAttrMember(STRINGIFY(name), T_OBJECT, offsetof(BoxedSysFlags, name));
ADD(division_warning);
ADD(bytes_warning);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment