Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17725
Modified Files:
PyVARDESC.cpp
Log Message:
Remove warnings for VAR_DISPATCH as win32com.client already handled them.
Index: PyVARDESC.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyVARDESC.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PyVARDESC.cpp 24 May 2008 02:55:34 -0000 1.5
--- PyVARDESC.cpp 1 Jul 2008 01:22:14 -0000 1.6
***************
*** 56,61 ****
return NULL;
v->lpvarValue = pVar;
! }
! else {
PyCom_LoggerWarning(NULL, "PyObject_AsVARDESC has unknown varkind (%d) - None will be used", v->varkind);
}
--- 56,63 ----
return NULL;
v->lpvarValue = pVar;
! } else if (v->varkind == VAR_DISPATCH) {
! // nothing to do - memid is all that is needed by the caller.
! ;
! } else {
PyCom_LoggerWarning(NULL, "PyObject_AsVARDESC has unknown varkind (%d) - None will be used", v->varkind);
}
***************
*** 176,179 ****
--- 178,185 ----
break;
}
+ } else if (varkind == VAR_DISPATCH) {
+ // all caller needs is memid, which is already setup.
+ value = Py_None;
+ Py_INCREF(Py_None);
} else {
PyCom_LoggerWarning(NULL, "PyVARDESC ctor has unknown varkind (%d) - returning None", varkind);
|