[Python-checkins] bpo-16086: Fix PyType_GetFlags() documentation (GH-10758) (GH-10789)

Victor Stinner webhook-mailer at python.org
Thu Nov 29 06:07:37 EST 2018

commit: e754159ef0af99a4124dd041ab7ceb77fcc922ad
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Victor Stinner <vstinner at redhat.com>
date: 2018-11-29T12:07:33+01:00

bpo-16086: Fix PyType_GetFlags() documentation (GH-10758) (GH-10789)

PyType_GetFlags() return type is unsigned long, not long.
(cherry picked from commit 9fbcfc08e5814d7aa9287740187e461425a99f67)

Co-authored-by: Eddie Elizondo <eduardo.elizondorueda at gmail.com>

M Doc/c-api/type.rst

diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst
index 60c5e73960b3..4dfd53fb9f07 100644
--- a/Doc/c-api/type.rst
+++ b/Doc/c-api/type.rst
@@ -35,7 +35,7 @@ Type Objects
    Clear the internal lookup cache. Return the current version tag.
-.. c:function:: long PyType_GetFlags(PyTypeObject* type)
+.. c:function:: unsigned long PyType_GetFlags(PyTypeObject* type)
    Return the :c:member:`~PyTypeObject.tp_flags` member of *type*. This function is primarily
    meant for use with `Py_LIMITED_API`; the individual flag bits are
@@ -44,6 +44,9 @@ Type Objects
    .. versionadded:: 3.2
+   .. versionchanged:: 3.4
+      The return type is now ``unsigned long`` rather than ``long``.
 .. c:function:: void PyType_Modified(PyTypeObject *type)

More information about the Python-checkins mailing list