[pywin32-checkins] pywin32/com/win32com/src/extensions PyVARDESC.cpp, 1.3, 1.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-05-18 13:43:01
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14938/win32com/src/extensions Modified Files: PyVARDESC.cpp Log Message: Generate warning when we see an unknown VARDESC type and return None Index: PyVARDESC.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyVARDESC.cpp 24 May 2007 06:01:04 -0000 1.3 --- PyVARDESC.cpp 18 May 2008 13:43:06 -0000 1.4 *************** *** 57,60 **** --- 57,63 ---- v->lpvarValue = pVar; } + else { + PyCom_LoggerWarning(NULL, "PyObject_AsVARDESC has unknown varkind (%d) - None will be used", v->varkind); + } // else ignore value. return TRUE; *************** *** 142,148 **** varkind = pVD->varkind; ! if (pVD->varkind == VAR_PERINSTANCE) value = PyInt_FromLong(pVD->oInst); ! else if (pVD->varkind == VAR_CONST) { VARIANT varValue; --- 145,151 ---- varkind = pVD->varkind; ! if (varkind == VAR_PERINSTANCE) value = PyInt_FromLong(pVD->oInst); ! else if (varkind == VAR_CONST) { VARIANT varValue; *************** *** 159,162 **** --- 162,166 ---- VariantClear(&varValue); } else { + PyCom_LoggerWarning(NULL, "PyVARDESC ctor has unknown varkind (%d) - returning None", varkind); value = Py_None; Py_INCREF(Py_None); |