From: Victor Stinner Date: Fri, 7 Feb 2020 00:43:25 +0000 (+0100) Subject: bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385) X-Git-Tag: v3.9.0a4~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f95cd199b4bc16775c8c48641bd85416b17742e7;p=thirdparty%2FPython%2Fcpython.git bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385) Only define PyTypeObject type once. --- diff --git a/Include/cpython/object.h b/Include/cpython/object.h index 0b5260eda7d8..4600f942ee76 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 "." */ 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 {