Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20576/win32com/src
Modified Files:
oleargs.cpp
Log Message:
Fix and test some limitations passing around currency objects.
Should fix [ 1935488 ] gencache and Delphi Currency
Index: oleargs.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/oleargs.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** oleargs.cpp 11 Sep 2007 08:55:20 -0000 1.40
--- oleargs.cpp 8 Apr 2008 11:51:26 -0000 1.41
***************
*** 1329,1337 ****
rc = PyObject_AsVARIANTRecordInfo(obj, var);
break;
default:
// could try default, but this error indicates we need to
// beef up the VARIANT support, rather than default.
TCHAR buf[200];
! wsprintf(buf, _T("The VARIANT type is unknown (%08lx)"), m_reqdType);
OleSetTypeErrorT(buf);
rc = FALSE;
--- 1329,1349 ----
rc = PyObject_AsVARIANTRecordInfo(obj, var);
break;
+ case VT_CY:
+ rc = PyObject_AsCurrency(obj, &V_CY(var));
+ break;
+ case VT_CY | VT_BYREF:
+ if (bCreateBuffers)
+ V_CYREF(var) = &m_cyBuf;
+ if (!VALID_BYREF_MISSING(obj)) {
+ if (!PyObject_AsCurrency(obj, V_CYREF(var)))
+ BREAK_FALSE;
+ } else
+ V_CYREF(var)->int64 = 0;
+ break;
default:
// could try default, but this error indicates we need to
// beef up the VARIANT support, rather than default.
TCHAR buf[200];
! wsprintf(buf, _T("The VARIANT type is unknown (0x%08lx)"), m_reqdType);
OleSetTypeErrorT(buf);
rc = FALSE;
|