[Python-checkins] [3.6] bpo-25438: document what codec PyMemberDef T_STRING decodes the char * as (GH-10580) (GH-10587)

Miss Islington (bot) webhook-mailer at python.org
Sat Nov 17 14:50:28 EST 2018


https://github.com/python/cpython/commit/8945017be4cc9527767bb66673e73e28e4b0b4d3
commit: 8945017be4cc9527767bb66673e73e28e4b0b4d3
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-11-17T11:50:25-08:00
summary:

[3.6] bpo-25438: document what codec PyMemberDef T_STRING decodes the char * as (GH-10580) (GH-10587)



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 at outlook.com>


https://bugs.python.org/issue25438

files:
M Doc/c-api/structures.rst

diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst
index 675f6f26921c..c493f6469d68 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*).
 
 



More information about the Python-checkins mailing list