Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5d7c1b1a
Commit
5d7c1b1a
authored
Jul 25, 2013
by
Brett Cannon
Browse files
Options
Browse Files
Download
Plain Diff
merge for issue #18556
parents
b41803e3
845f7845
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_ctypes/cfield.c
Modules/_ctypes/cfield.c
+5
-1
No files found.
Misc/NEWS
View file @
5d7c1b1a
...
...
@@ -166,6 +166,9 @@ Core and Builtins
Library
-------
-
Issue
#
18556
:
Check
the
return
type
of
PyUnicode_AsWideChar
()
in
ctype
's
U_set().
- Issue #17818: aifc.getparams now returns a namedtuple.
- Issue #18549: Eliminate dead code in socket_ntohl()
...
...
Modules/_ctypes/cfield.c
View file @
5d7c1b1a
...
...
@@ -1260,7 +1260,11 @@ U_set(void *ptr, PyObject *value, Py_ssize_t length)
}
else
if
(
size
<
length
-
1
)
/* copy terminating NUL character if there is space */
size
+=
1
;
PyUnicode_AsWideChar
(
value
,
(
wchar_t
*
)
ptr
,
size
);
if
(
PyUnicode_AsWideChar
(
value
,
(
wchar_t
*
)
ptr
,
size
)
==
-
1
)
{
return
NULL
;
}
return
value
;
}
...
...
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