]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46670: Remove unused macros in the Objects directory (GH-31193)
authorVictor Stinner <vstinner@python.org>
Mon, 7 Feb 2022 15:21:41 +0000 (16:21 +0100)
committerGitHub <noreply@github.com>
Mon, 7 Feb 2022 15:21:41 +0000 (16:21 +0100)
Objects/dictobject.c
Objects/memoryobject.c
Objects/obmalloc.c
Objects/unicodectype.c

index 0ad0f0b59c87e293aad1aa1e0cb30f74058876a2..2c8ec79ded72c74eed1d6a1b5b8e88fb0b0543ac 100644 (file)
@@ -292,7 +292,6 @@ _PyDict_DebugMallocStats(FILE *out)
 }
 
 #define DK_MASK(dk) (DK_SIZE(dk)-1)
-#define IS_POWER_OF_2(x) (((x) & (x-1)) == 0)
 
 static void free_keys_object(PyDictKeysObject *keys);
 
index dfcb31e5b33070b40b2ffbfedf26ab784c2f9a46..45fe8985c2adb4126c1e770041a12b80ab925022 100644 (file)
@@ -67,14 +67,6 @@ class memoryview "PyMemoryViewObject *" "&PyMemoryView_Type"
 */
 
 
-#define CHECK_MBUF_RELEASED(mbuf) \
-    if (((_PyManagedBufferObject *)mbuf)->flags&_Py_MANAGED_BUFFER_RELEASED) { \
-        PyErr_SetString(PyExc_ValueError,                                      \
-            "operation forbidden on released memoryview object");              \
-        return NULL;                                                           \
-    }
-
-
 static inline _PyManagedBufferObject *
 mbuf_alloc(void)
 {
index bad4dc0963921aff49fd33c15c8d37c61e2e51f2..560e1c59a9c58ac57a61502ba769bb016ac48be6 100644 (file)
@@ -900,7 +900,6 @@ static int running_on_valgrind = -1;
  * currently targets.
  */
 #define SYSTEM_PAGE_SIZE        (4 * 1024)
-#define SYSTEM_PAGE_SIZE_MASK   (SYSTEM_PAGE_SIZE - 1)
 
 /*
  * Maximum amount of memory managed by the allocator for small requests.
index d8c95c8b44cea71ec201812af4a0c4884b933555..aa5c5b2a4ad2ebc46128a1f5842f25067b6b7540 100644 (file)
@@ -14,8 +14,6 @@
 #define DECIMAL_MASK 0x02
 #define DIGIT_MASK 0x04
 #define LOWER_MASK 0x08
-#define LINEBREAK_MASK 0x10
-#define SPACE_MASK 0x20
 #define TITLE_MASK 0x40
 #define UPPER_MASK 0x80
 #define XID_START_MASK 0x100