Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
cpython
Commits
ec21ccde
Commit
ec21ccde
authored
15 years ago
by
Thomas Heller
Browse files
Options
Download
Email Patches
Plain Diff
Issue 5041: ctypes unwilling to allow pickling wide character.
parent
addfe228
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
1 deletion
+8
-1
Lib/ctypes/test/test_pickling.py
Lib/ctypes/test/test_pickling.py
+5
-0
Misc/NEWS
Misc/NEWS
+2
-0
Modules/_ctypes/_ctypes.c
Modules/_ctypes/_ctypes.c
+1
-1
No files found.
Lib/ctypes/test/test_pickling.py
View file @
ec21ccde
...
...
@@ -66,6 +66,11 @@ class PickleTest(unittest.TestCase):
]:
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
):
def
dumps
(
self
,
item
):
return
pickle
.
dumps
(
item
,
1
)
...
...
This diff is collapsed.
Click to expand it.
Misc/NEWS
View file @
ec21ccde
...
...
@@ -244,6 +244,8 @@ Core and Builtins
Library
-------
- Issue #5041: ctypes does now allow pickling wide character.
- Issue #5812: For the two-argument form of the Fraction constructor,
Fraction(m, n), m and n are permitted to be arbitrary Rational
instances.
...
...
This diff is collapsed.
Click to expand it.
Modules/_ctypes/_ctypes.c
View file @
ec21ccde
...
...
@@ -1952,7 +1952,7 @@ SimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
ml
=
&
c_void_p_method
;
stgdict
->
flags
|=
TYPEFLAG_ISPOINTER
;
break
;
case
'
u
'
:
case
'
s
'
:
case
'X'
:
case
'O'
:
ml
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment