Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1:/tmp/cvs-serv24841
Modified Files:
oleargs.cpp univgw_dataconv.cpp
Log Message:
Avoid referencing VARIANT structure element directly - use the V_ macros
for that purpose (which we did nearly everywhere already)
Index: oleargs.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/oleargs.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** oleargs.cpp 2 Nov 2003 09:52:51 -0000 1.24
--- oleargs.cpp 8 Nov 2003 00:34:32 -0000 1.25
***************
*** 903,907 ****
// it alone.
if (V_VT(var)==VT_EMPTY) {
! var->vt = m_reqdType;
assert(m_arrayBuf==NULL); // shouldn't be anything else here!
V_ARRAYREF(var) = &m_arrayBuf;
--- 903,907 ----
// it alone.
if (V_VT(var)==VT_EMPTY) {
! V_VT(var) = m_reqdType;
assert(m_arrayBuf==NULL); // shouldn't be anything else here!
V_ARRAYREF(var) = &m_arrayBuf;
***************
*** 1199,1203 ****
Py_XDECREF(obUse);
if (rc)
! var->vt = m_reqdType;
return rc;
}
--- 1199,1203 ----
Py_XDECREF(obUse);
if (rc)
! V_VT(var) = m_reqdType;
return rc;
}
Index: univgw_dataconv.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/univgw_dataconv.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** univgw_dataconv.cpp 10 Jan 2003 02:43:42 -0000 1.5
--- univgw_dataconv.cpp 8 Nov 2003 00:34:32 -0000 1.6
***************
*** 700,707 ****
vtArgType = VT_UI4 | (vtArgType & VT_TYPEMASK);
}
! var.vt = vtArgType;
// Copy the data into the variant...
! SizeOfVT(var.vt, (int *)&cb, NULL);
! memcpy(&var.lVal, pb, cb);
// Convert it into a PyObject:
obArg = PyCom_PyObjectFromVariant(&var);
--- 700,707 ----
vtArgType = VT_UI4 | (vtArgType & VT_TYPEMASK);
}
! V_VT(&var) = vtArgType;
// Copy the data into the variant...
! SizeOfVT(V_VT(&var), (int *)&cb, NULL);
! memcpy(&V_I4(&var), pb, cb);
// Convert it into a PyObject:
obArg = PyCom_PyObjectFromVariant(&var);
|