Implemented PEP 370

This commit is contained in:
Christian Heimes 2008-05-06 22:41:46 +00:00
parent 323c40d48c
commit af748c3ab8
10 changed files with 397 additions and 62 deletions

View file

@ -82,6 +82,7 @@ int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
on the command line, and is used in 2.2 by ceval.c to make all "/" divisions
true divisions (which they will be in 2.3). */
int _Py_QnewFlag = 0;
int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
/* PyModule_GetWarningsModule is no longer necessary as of 2.6
since _warnings is builtin. This API should not be used. */

View file

@ -1101,7 +1101,7 @@ svnversion_init(void)
shortbranch[len] = '\0';
}
else {
Py_FatalError("bad HeadURL");
Py_FatalError("bad HeadURL");
return;
}
@ -1158,7 +1158,7 @@ static PyStructSequence_Field flags_fields[] = {
{"interactive", "-i"},
{"optimize", "-O or -OO"},
{"dont_write_bytecode", "-B"},
/* {"no_user_site", "-s"}, */
{"no_user_site", "-s"},
{"no_site", "-S"},
{"ignore_environment", "-E"},
{"tabcheck", "-t or -tt"},
@ -1178,9 +1178,9 @@ static PyStructSequence_Desc flags_desc = {
flags__doc__, /* doc */
flags_fields, /* fields */
#ifdef RISCOS
14
15
#else
13
14
#endif
};
@ -1205,7 +1205,7 @@ make_flags(void)
SetFlag(Py_InteractiveFlag);
SetFlag(Py_OptimizeFlag);
SetFlag(Py_DontWriteBytecodeFlag);
/* SetFlag(Py_NoUserSiteDirectory); */
SetFlag(Py_NoUserSiteDirectory);
SetFlag(Py_NoSiteFlag);
SetFlag(Py_IgnoreEnvironmentFlag);
SetFlag(Py_TabcheckFlag);