[Python-checkins] r71849 - in python/branches/release30-maint: Lib/ctypes/test/test_pickling.py Misc/NEWS Modules/_ctypes/_ctypes.c

thomas.heller python-checkins at python.org
Fri Apr 24 22:09:23 CEST 2009


Author: thomas.heller
Date: Fri Apr 24 22:09:23 2009
New Revision: 71849

Log:
Merged revisions 71848 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r71848 | thomas.heller | 2009-04-24 22:05:20 +0200 (Fr, 24 Apr 2009) | 9 lines
  
  Merged revisions 71847 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r71847 | thomas.heller | 2009-04-24 22:00:41 +0200 (Fr, 24 Apr 2009) | 2 lines
    
    Issue 5041: ctypes unwilling to allow pickling wide character.
  ........
................


Modified:
   python/branches/release30-maint/   (props changed)
   python/branches/release30-maint/Lib/ctypes/test/test_pickling.py
   python/branches/release30-maint/Misc/NEWS
   python/branches/release30-maint/Modules/_ctypes/_ctypes.c

Modified: python/branches/release30-maint/Lib/ctypes/test/test_pickling.py
==============================================================================
--- python/branches/release30-maint/Lib/ctypes/test/test_pickling.py	(original)
+++ python/branches/release30-maint/Lib/ctypes/test/test_pickling.py	Fri Apr 24 22:09:23 2009
@@ -66,6 +66,11 @@
             ]:
             self.assertRaises(ValueError, lambda: self.dumps(item))
 
+    def test_wchar(self):
+        pickle.dumps(c_char(b"x"))
+        # Issue 5049
+        pickle.dumps(c_wchar("x"))
+
 class PickleTest_1(PickleTest):
     def dumps(self, item):
         return pickle.dumps(item, 1)

Modified: python/branches/release30-maint/Misc/NEWS
==============================================================================
--- python/branches/release30-maint/Misc/NEWS	(original)
+++ python/branches/release30-maint/Misc/NEWS	Fri Apr 24 22:09:23 2009
@@ -230,6 +230,8 @@
 Library
 -------
 
+- Issue #5041: ctypes does now allow pickling wide character.
+
 - Issue #5731: Distutils bdist_wininst no longer worked on non-Windows 
   platforms. Initial patch by Paul Moore.
 

Modified: python/branches/release30-maint/Modules/_ctypes/_ctypes.c
==============================================================================
--- python/branches/release30-maint/Modules/_ctypes/_ctypes.c	(original)
+++ python/branches/release30-maint/Modules/_ctypes/_ctypes.c	Fri Apr 24 22:09:23 2009
@@ -1927,7 +1927,7 @@
 			ml = &c_void_p_method;
 			stgdict->flags |= TYPEFLAG_ISPOINTER;
 			break;
-		case 'u':
+		case 's':
 		case 'X':
 		case 'O':
 			ml = NULL;


More information about the Python-checkins mailing list