diff options
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 81adf5d..9337f5c 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -899,6 +899,12 @@ PySys_AddWarnOption(const wchar_t *s) } } +int +PySys_HasWarnOptions(void) +{ + return (warnoptions != NULL && (PyList_Size(warnoptions) > 0)) ? 1 : 0; +} + /* XXX This doc string is too long to be a single string literal in VC++ 5.0. Two literals concatenated works just fine. If you have a K&R compiler or other abomination that however *does* understand longer strings, @@ -1101,6 +1107,7 @@ static PyStructSequence_Field flags_fields[] = { #endif /* {"unbuffered", "-u"}, */ /* {"skip_first", "-x"}, */ + {"bytes_warning", "-b"}, {0} }; @@ -1144,6 +1151,7 @@ make_flags(void) #endif /* SetFlag(saw_unbuffered_flag); */ /* SetFlag(skipfirstline); */ + SetFlag(Py_BytesWarningFlag); #undef SetFlag if (PyErr_Occurred()) { |