summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 00:43:25 (GMT)
committerGitHub <noreply@github.com>2020-02-07 00:43:25 (GMT)
commitf95cd199b4bc16775c8c48641bd85416b17742e7 (patch)
treecd5bd75ba89b8caf7bf27817a856ebb4f4914dab
parentc86a11221df7e37da389f9c6ce6e47ea22dc44ff (diff)
downloadcpython-f95cd199b4bc16775c8c48641bd85416b17742e7.zip
cpython-f95cd199b4bc16775c8c48641bd85416b17742e7.tar.gz
cpython-f95cd199b4bc16775c8c48641bd85416b17742e7.tar.bz2
bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385)
Only define PyTypeObject type once.
-rw-r--r--Include/cpython/object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index 0b5260e..4600f94 100644
--- a/Include/cpython/object.h
+++ b/Include/cpython/object.h
@@ -190,7 +190,7 @@ typedef struct {
* backwards-compatibility */
typedef Py_ssize_t printfunc;
-typedef struct _typeobject {
+struct _typeobject {
PyObject_VAR_HEAD
const char *tp_name; /* For printing, in format "<module>.<name>" */
Py_ssize_t tp_basicsize, tp_itemsize; /* For allocation */
@@ -271,7 +271,7 @@ typedef struct _typeobject {
destructor tp_finalize;
vectorcallfunc tp_vectorcall;
-} PyTypeObject;
+};
/* The *real* layout of a type object when allocated on the heap */
typedef struct _heaptypeobject {