commit | d1a97b36595726074a83452e5c476806936becba | [log] [tgz] |
---|---|---|
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Sat Nov 17 11:49:58 2018 -0800 |
committer | GitHub <noreply@github.com> | Sat Nov 17 11:49:58 2018 -0800 |
tree | 12716e62487150a0ff924ca180211a0f1ecad1b2 | |
parent | f415aa1eef091db099a661a187646b1a76878487 [diff] [blame] |
[3.7] bpo-25438: document what codec PyMemberDef T_STRING decodes the char * as (GH-10580) (GH-10586) Source of T_STRING: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Python/structmember.cGH-L51 Source of PyUnicode_FromString https://github.com/python/cpython/blob/master/Include/unicodeobject.hGH-L702 https://bugs.python.org/issue25438 (cherry picked from commit 689d555ec135d4115574addd063c358ac4897cc4) Co-authored-by: Windson yang <wiwindson@outlook.com> https://bugs.python.org/issue25438
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 797b904..da45da1 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst
@@ -292,7 +292,8 @@ :attr:`flags` can be ``0`` for write and read access or :c:macro:`READONLY` for read-only access. Using :c:macro:`T_STRING` for :attr:`type` implies - :c:macro:`READONLY`. Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` + :c:macro:`READONLY`. :c:macro:`T_STRING` data is interpreted as UTF-8. + Only :c:macro:`T_OBJECT` and :c:macro:`T_OBJECT_EX` members can be deleted. (They are set to *NULL*).