]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385)
authorVictor Stinner <vstinner@python.org>
Fri, 7 Feb 2020 00:43:25 +0000 (01:43 +0100)
committerGitHub <noreply@github.com>
Fri, 7 Feb 2020 00:43:25 +0000 (01:43 +0100)
Only define PyTypeObject type once.

Include/cpython/object.h

index 0b5260eda7d8a2c7a163ea072f04586a6df553f8..4600f942ee7669c225a38ed0f1ebb4bfbfdd0fa8 100644 (file)
@@ -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 {