bpo-39571: Fix clang warning on PyTypeObject typedef (GH-18385)

Only define PyTypeObject type once.
This commit is contained in:
Victor Stinner 2020-02-07 01:43:25 +01:00 committed by GitHub
parent c86a11221d
commit f95cd199b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View 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 {