diff options
author | Windson yang <wiwindson@outlook.com> | 2018-11-17 19:16:51 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-17 19:16:51 (GMT) |
commit | 689d555ec135d4115574addd063c358ac4897cc4 (patch) | |
tree | ba1d0bd4da45b17a4214c1192dcd32ba98fa9442 /Doc/c-api | |
parent | 38df97a03c5102e717a110ab69bff8e5c9ebfd08 (diff) | |
download | cpython-689d555ec135d4115574addd063c358ac4897cc4.zip cpython-689d555ec135d4115574addd063c358ac4897cc4.tar.gz cpython-689d555ec135d4115574addd063c358ac4897cc4.tar.bz2 |
bpo-25438: document what codec PyMemberDef T_STRING decodes the char * as (GH-10580)
Source of T_STRING: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Python/structmember.c#L51
Source of PyUnicode_FromString
https://github.com/python/cpython/blob/master/Include/unicodeobject.h#L702
https://bugs.python.org/issue25438
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/structures.rst | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ definition with the same method name. :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*). |