mirror of
https://github.com/python/cpython
synced 2024-10-14 09:01:41 +00:00
- Issue #13840: Fix ctypes.create_string_buffer exception message and docs.
This commit is contained in:
commit
c9e7ef7d70
|
@ -1823,8 +1823,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)
|
||||
|
@ -1841,8 +1839,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()
|
||||
|
|
|
@ -1837,6 +1837,9 @@ Tools/Demos
|
|||
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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue