Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31995
Modified Files:
PythonCOM.cpp
Log Message:
Use 'k' format string when parsing scodes in, eg, GetSCodeString(), so
long hex constants work.
Index: PythonCOM.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** PythonCOM.cpp 4 Jul 2007 18:40:46 -0000 1.47
--- PythonCOM.cpp 27 Aug 2007 05:12:11 -0000 1.48
***************
*** 599,603 ****
TCHAR buf[512];
// @pyparm int|scode||The OLE error code for the scode string requested.
! if (!PyArg_ParseTuple(args, "i", &scode))
return NULL;
GetScodeString(scode, buf, sizeof(buf));
--- 599,603 ----
TCHAR buf[512];
// @pyparm int|scode||The OLE error code for the scode string requested.
! if (!PyArg_ParseTuple(args, "k", &scode))
return NULL;
GetScodeString(scode, buf, sizeof(buf));
***************
*** 613,617 ****
SCODE scode;
// @pyparm int|scode||An OLE error code to return the scode range string for.
! if (!PyArg_ParseTuple(args, "i", &scode))
return NULL;
return Py_BuildValue("z", GetScodeRangeString(scode) );
--- 613,617 ----
SCODE scode;
// @pyparm int|scode||An OLE error code to return the scode range string for.
! if (!PyArg_ParseTuple(args, "k", &scode))
return NULL;
return Py_BuildValue("z", GetScodeRangeString(scode) );
***************
*** 623,627 ****
SCODE scode;
// @pyparm int|scode||The OLE error code for the severity string requested.
! if (!PyArg_ParseTuple(args, "i", &scode))
return NULL;
return Py_BuildValue("z", GetSeverityString(scode) );
--- 623,627 ----
SCODE scode;
// @pyparm int|scode||The OLE error code for the severity string requested.
! if (!PyArg_ParseTuple(args, "k", &scode))
return NULL;
return Py_BuildValue("z", GetSeverityString(scode) );
***************
*** 633,637 ****
SCODE scode;
// @pyparm int|scode||The OLE error code for the facility string requested.
! if (!PyArg_ParseTuple(args, "i", &scode))
return NULL;
return Py_BuildValue("z", GetFacilityString(scode) );
--- 633,637 ----
SCODE scode;
// @pyparm int|scode||The OLE error code for the facility string requested.
! if (!PyArg_ParseTuple(args, "k", &scode))
return NULL;
return Py_BuildValue("z", GetFacilityString(scode) );
|