Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12905/win32/src
Modified Files:
PyWinTypes.h PyWinTypesmodule.cpp
Log Message:
Add a parm to PyWinObject_AsResourceId to allow None
Index: PyWinTypesmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypesmodule.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** PyWinTypesmodule.cpp 1 Apr 2007 13:07:41 -0000 1.27
--- PyWinTypesmodule.cpp 7 May 2007 03:41:21 -0000 1.28
***************
*** 574,581 ****
// When passing resource names and types as strings, they are usually formatted
// as a pound sign followed by decimal form of the id. ('#42' for example)
! BOOL PyWinObject_AsResourceIdA(PyObject *ob, char **presource_id)
{
// Plain character conversion
! if (PyWinObject_AsString(ob, presource_id))
return TRUE;
PyErr_Clear();
--- 574,581 ----
// When passing resource names and types as strings, they are usually formatted
// as a pound sign followed by decimal form of the id. ('#42' for example)
! BOOL PyWinObject_AsResourceIdA(PyObject *ob, char **presource_id, BOOL bNoneOK)
{
// Plain character conversion
! if (PyWinObject_AsString(ob, presource_id, bNoneOK))
return TRUE;
PyErr_Clear();
***************
*** 587,594 ****
}
! BOOL PyWinObject_AsResourceIdW(PyObject *ob, WCHAR **presource_id)
{
// Unicode version of above
! if (PyWinObject_AsWCHAR(ob, presource_id))
return TRUE;
PyErr_Clear();
--- 587,594 ----
}
! BOOL PyWinObject_AsResourceIdW(PyObject *ob, WCHAR **presource_id, BOOL bNoneOK)
{
// Unicode version of above
! if (PyWinObject_AsWCHAR(ob, presource_id, bNoneOK))
return TRUE;
PyErr_Clear();
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** PyWinTypes.h 1 Apr 2007 13:07:41 -0000 1.37
--- PyWinTypes.h 7 May 2007 03:41:21 -0000 1.38
***************
*** 343,348 ****
// Conversion for resource id/name and class atom
! PYWINTYPES_EXPORT BOOL PyWinObject_AsResourceIdA(PyObject *ob, char **presource_id);
! PYWINTYPES_EXPORT BOOL PyWinObject_AsResourceIdW(PyObject *ob, WCHAR **presource_id);
PYWINTYPES_EXPORT void PyWinObject_FreeResourceId(char *resource_id);
PYWINTYPES_EXPORT void PyWinObject_FreeResourceId(WCHAR *resource_id);
--- 343,348 ----
// Conversion for resource id/name and class atom
! PYWINTYPES_EXPORT BOOL PyWinObject_AsResourceIdA(PyObject *ob, char **presource_id, BOOL bNoneOK = FALSE);
! PYWINTYPES_EXPORT BOOL PyWinObject_AsResourceIdW(PyObject *ob, WCHAR **presource_id, BOOL bNoneOK = FALSE);
PYWINTYPES_EXPORT void PyWinObject_FreeResourceId(char *resource_id);
PYWINTYPES_EXPORT void PyWinObject_FreeResourceId(WCHAR *resource_id);
|