From 600e539bfbce971e53cbc80dfd29bc63a5d74c2f Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Mon, 7 Jun 2021 17:27:37 -0600 Subject: [PATCH] Silence some compiler warnings. --- Include/cpython/code.h | 1 - Include/internal/pycore_code.h | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Include/cpython/code.h b/Include/cpython/code.h index a3383744546ff0..a3db7d9d5eff7a 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -26,7 +26,6 @@ typedef uint16_t _Py_CODEUNIT; typedef struct _PyOpcache _PyOpcache; -// These are duplicated from pycore_code.h. typedef unsigned char _PyLocalsPlusKind; typedef _PyLocalsPlusKind *_PyLocalsPlusKinds; diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index d1ff597bf54610..2709e082b05b17 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -167,8 +167,8 @@ extern Py_ssize_t _Py_QuickenedCount; * "free" kind is mutually exclusive with both. */ -// We would use an enum if C let us specify the storage type. -typedef unsigned char _PyLocalsPlusKind; +// For now _PyLocalsPlusKind and _PyLocalsPlusKinds are defined +// in Include/cpython/code.h. /* Note that these all fit within _PyLocalsPlusKind, as do combinations. */ // Later, we will use the smaller numbers to differentiate the different // kinds of locals (e.g. pos-only arg, varkwargs, local-only). @@ -176,8 +176,6 @@ typedef unsigned char _PyLocalsPlusKind; #define CO_FAST_CELL 0x40 #define CO_FAST_FREE 0x80 -typedef _PyLocalsPlusKind *_PyLocalsPlusKinds; - static inline int _PyCode_InitLocalsPlusKinds(int num, _PyLocalsPlusKinds *pkinds) {