Update of /cvsroot/pywin32/pywin32/win32/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19442
Modified Files:
PyWinTypes.h PyUnicode.cpp
Log Message:
remove unused PyWin_WCHAR_AsString and PyWin_Bstr_AsString functions
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** PyWinTypes.h 3 Feb 2009 04:28:42 -0000 1.66
--- PyWinTypes.h 3 Feb 2009 04:42:05 -0000 1.67
***************
*** 356,362 ****
PYWINTYPES_EXPORT BOOL PyWinObject_AsTaskAllocatedWCHAR(PyObject *stringObject, WCHAR **ppResult, BOOL bNoneOK /*= FALSE*/,DWORD *pResultLen /*= NULL*/);
PYWINTYPES_EXPORT void PyWinObject_FreeTaskAllocatedWCHAR(WCHAR * str);
- // String conversion - These must also be freed with PyWinObject_FreeString
- PYWINTYPES_EXPORT BOOL PyWin_WCHAR_AsString(WCHAR *input, DWORD inLen, char **pResult);
- PYWINTYPES_EXPORT BOOL PyWin_Bstr_AsString(BSTR input, char **pResult);
PYWINTYPES_EXPORT void PyWinObject_FreeString(char *str);
--- 356,359 ----
Index: PyUnicode.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** PyUnicode.cpp 3 Feb 2009 04:28:42 -0000 1.31
--- PyUnicode.cpp 3 Feb 2009 04:42:05 -0000 1.32
***************
*** 122,146 ****
}
- // Convert a WCHAR string to "char *"
- // If len is known, pass it, else -1
- // NOTE - string must be freed with PyWinObject_FreeString
- BOOL PyWin_WCHAR_AsString(WCHAR *input, DWORD inLen, char **pResult)
- {
- if (inLen==-1)
- inLen = wcslen(input);
- // convert from string len to include terminator.
- inLen++;
- char *buf = (char *)PyMem_Malloc(inLen);
-
- DWORD len = WideCharToMultiByte(CP_ACP, 0, input, inLen, buf, inLen, NULL, NULL);
- if (len==0) {
- PyMem_Free(buf);
- PyWin_SetAPIError("WideCharToMultiByte");
- return FALSE;
- }
- *pResult = buf;
- return TRUE;
- }
-
// Convert a Python object to a "char *" - allow embedded NULLs, None, etc.
BOOL PyWinObject_AsString(PyObject *stringObject, char **pResult, BOOL bNoneOK /*= FALSE*/, DWORD *pResultLen /* = NULL */)
--- 122,125 ----
|