Kaydet (Commit) 40f0a876 authored tarafından Brett Cannon's avatar Brett Cannon

Fix a bug in PySys_HasWarnOption() where it was not properly checking the

length of the list storing the warning options.
üst b2693e00
......@@ -943,7 +943,7 @@ PySys_AddWarnOption(char *s)
int
PySys_HasWarnOptions(void)
{
return warnoptions ? 1 : 0;
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.
......
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