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

length of the list storing the warning options.
This commit is contained in:
Brett Cannon 2008-04-13 00:18:44 +00:00
parent b2693e007b
commit 40f0a87666
1 changed files with 1 additions and 1 deletions

View File

@ -943,7 +943,7 @@ PySys_AddWarnOption(char *s)
int int
PySys_HasWarnOptions(void) 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. /* XXX This doc string is too long to be a single string literal in VC++ 5.0.