Kaydet (Commit) ec21ccde authored tarafından Thomas Heller's avatar Thomas Heller

Issue 5041: ctypes unwilling to allow pickling wide character.

üst addfe228
...@@ -66,6 +66,11 @@ class PickleTest(unittest.TestCase): ...@@ -66,6 +66,11 @@ class PickleTest(unittest.TestCase):
]: ]:
self.assertRaises(ValueError, lambda: self.dumps(item)) self.assertRaises(ValueError, lambda: self.dumps(item))
def test_wchar(self):
pickle.dumps(c_char("x"))
# Issue 5049
pickle.dumps(c_wchar(u"x"))
class PickleTest_1(PickleTest): class PickleTest_1(PickleTest):
def dumps(self, item): def dumps(self, item):
return pickle.dumps(item, 1) return pickle.dumps(item, 1)
......
...@@ -244,6 +244,8 @@ Core and Builtins ...@@ -244,6 +244,8 @@ Core and Builtins
Library Library
------- -------
- Issue #5041: ctypes does now allow pickling wide character.
- Issue #5812: For the two-argument form of the Fraction constructor, - Issue #5812: For the two-argument form of the Fraction constructor,
Fraction(m, n), m and n are permitted to be arbitrary Rational Fraction(m, n), m and n are permitted to be arbitrary Rational
instances. instances.
......
...@@ -1952,7 +1952,7 @@ SimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds) ...@@ -1952,7 +1952,7 @@ SimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
ml = &c_void_p_method; ml = &c_void_p_method;
stgdict->flags |= TYPEFLAG_ISPOINTER; stgdict->flags |= TYPEFLAG_ISPOINTER;
break; break;
case 'u': case 's':
case 'X': case 'X':
case 'O': case 'O':
ml = NULL; ml = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment