placate msvc

This commit is contained in:
Benjamin Peterson 2013-03-18 23:39:53 -07:00
parent dc41f552a2
commit 7654ab9ef0
1 changed files with 2 additions and 1 deletions

View File

@ -931,12 +931,13 @@ static int add_ast_fields(void)
static int exists_not_none(PyObject *obj, _Py_Identifier *id)
{
int isnone;
PyObject *attr = _PyObject_GetAttrId(obj, id);
if (!attr) {
PyErr_Clear();
return 0;
}
int isnone = attr == Py_None;
isnone = attr == Py_None;
Py_DECREF(attr);
return !isnone;
}