I'm looking into com\win32com\src\oleargs.cpp, in function
PyCom_VariantFromPyObject, near line 65. This code converts a Python
object into a VARIANT.
else if (PyLong_Check(obj))
{
double dval = PyLong_AsDouble(obj);
BOOL isDword = FALSE;
if (dval >= 0 && dval < (double)ULONG_MAX)
{
DWORD dwval = (DWORD)dval;
if ((double)dwval == dval)
{
=> V_VT(var) = VT_I4;
=> V_I4(var) = dwval;
isDword = TRUE;
}
}
if (!isDword)
{
V_VT(var) = VT_R8;
V_R8(var) = dval;
}
}
Shouldn't the lines marked '=>' use VT_UI4 instead of VT_I4?
Thomas
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32