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
65992c1c
Commit
65992c1c
authored
Jan 26, 2012
by
Meador Inge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Issue #13840: Fix ctypes.create_string_buffer exception message and docs.
parent
eaac4f0d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
Doc/library/ctypes.rst
Doc/library/ctypes.rst
+0
-4
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_ctypes/_ctypes.c
Modules/_ctypes/_ctypes.c
+1
-1
No files found.
Doc/library/ctypes.rst
View file @
65992c1c
...
...
@@ -1815,8 +1815,6 @@ Utility functions
termination character. An integer can be passed as second argument which allows
to specify the size of the array if the length of the bytes should not be used.
If the first parameter is a string, it is converted into a bytes object
according to ctypes conversion rules.
.. function:: create_unicode_buffer(init_or_size, size=None)
...
...
@@ -1833,8 +1831,6 @@ Utility functions
allows to specify the size of the array if the length of the string should not
be used.
If the first parameter is a bytes object, it is converted into an unicode string
according to ctypes conversion rules.
.. function:: DllCanUnloadNow()
...
...
Misc/NEWS
View file @
65992c1c
...
...
@@ -402,6 +402,9 @@ Tests
Extension Modules
-----------------
- Issue #13840: The error message produced by ctypes.create_string_buffer
when given a Unicode string has been fixed.
- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
...
...
Modules/_ctypes/_ctypes.c
View file @
65992c1c
...
...
@@ -1096,7 +1096,7 @@ CharArray_set_value(CDataObject *self, PyObject *value)
if
(
!
PyBytes_Check
(
value
))
{
PyErr_Format
(
PyExc_TypeError
,
"
str/
bytes expected instead of %s instance"
,
"bytes expected instead of %s instance"
,
Py_TYPE
(
value
)
->
tp_name
);
return
-
1
;
}
else
...
...
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