[Python-checkins] bpo-46670: Remove unused macros in the Objects directory (GH-31193)
vstinner
webhook-mailer at python.org
Mon Feb 7 10:21:48 EST 2022
https://github.com/python/cpython/commit/760349198dbd8771629753e096a885c1aa28a1ca
commit: 760349198dbd8771629753e096a885c1aa28a1ca
branch: main
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2022-02-07T16:21:41+01:00
summary:
bpo-46670: Remove unused macros in the Objects directory (GH-31193)
files:
M Objects/dictobject.c
M Objects/memoryobject.c
M Objects/obmalloc.c
M Objects/unicodectype.c
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 0ad0f0b59c87e..2c8ec79ded72c 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -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);
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index dfcb31e5b3307..45fe8985c2adb 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -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)
{
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index bad4dc0963921..560e1c59a9c58 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -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.
diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c
index d8c95c8b44cea..aa5c5b2a4ad2e 100644
--- a/Objects/unicodectype.c
+++ b/Objects/unicodectype.c
@@ -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
More information about the Python-checkins
mailing list