| Update of /cvsroot/pywin32/pywin32/win32/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21712/win32/src
Modified Files:
	PyUnicode.cpp 
Log Message:
don't accept bytes objects as strings on py3k
Index: PyUnicode.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyUnicode.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** PyUnicode.cpp	3 Feb 2009 04:42:05 -0000	1.32
--- PyUnicode.cpp	3 Feb 2009 05:02:59 -0000	1.33
***************
*** 296,299 ****
--- 296,301 ----
  	BOOL rc = TRUE;
  	int resultLen = 0;
+ #if (PY_VERSION_HEX < 0x03000000)
+ 	# Do NOT accept 'bytes' object when a plain 'WCHAR' is needed on py3k.
  	if (PyString_Check(stringObject)) {
  		int size=PyString_Size(stringObject);
***************
*** 316,320 ****
  		(*pResult)[resultLen] = L'\0';
  	}
! 	else if (PyUnicode_Check(stringObject))
  	{
  		resultLen = PyUnicode_GET_SIZE(stringObject);
--- 318,324 ----
  		(*pResult)[resultLen] = L'\0';
  	}
! 	else
! #endif // py3k
! 	if (PyUnicode_Check(stringObject))
  	{
  		resultLen = PyUnicode_GET_SIZE(stringObject);
 |