8000 bpo-46670: Remove unused macros in the Objects directory (GH-31193) · python/cpython@7603491 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7603491

Browse files
authored
bpo-46670: Remove unused macros in the Objects directory (GH-31193)
1 parent 4f1d3f3 commit 7603491

File tree

4 files changed

+0
-12
lines changed

4 files changed

+0
-12
lines changed

Objects/dictobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ _PyDict_DebugMallocStats(FILE *out)
292292
}
293293

294294
#define DK_MASK(dk) (DK_SIZE(dk)-1)
295-
#define IS_POWER_OF_2(x) (((x) & (x-1)) == 0)
296295

297296
static void free_keys_object(PyDictKeysObject *keys);
298297

Objects/memoryobject.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,6 @@ class memoryview "PyMemoryViewObject *" "&PyMemoryView_Type"
6767
*/
6868

6969

70-
#define CHECK_MBUF_RELEASED(mbuf) \
71-
if (((_PyManagedBufferObject *)mbuf)->flags&_Py_MANAGED_BUFFER_RELEASED) { \
72-
PyErr_SetString(PyExc_ValueError, \
73-
"operation forbidden on released memoryview object"); \
74-
return NULL; \
75-
}
76-
77-
7870
static inline _PyManagedBufferObject *
7971
mbuf_alloc(void)
8072
{

Objects/obmalloc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,6 @@ static int running_on_valgrind = -1;
900900
* currently targets.
901901
*/
902902
#define SYSTEM_PAGE_SIZE (4 * 1024)
903-
#define SYSTEM_PAGE_SIZE_MASK (SYSTEM_PAGE_SIZE - 1)
904903

905904
/*
906905
* Maximum amount of memory managed by the allocator for small requests.

Objects/unicodectype.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#define DECIMAL_MASK 0x02
1515
#define DIGIT_MASK 0x04
1616
#define LOWER_MASK 0x08
17-
#define LINEBREAK_MASK 0x10
18-
#define SPACE_MASK 0x20
1917
#define TITLE_MASK 0x40
2018
#define UPPER_MASK 0x80
2119
#define XID_START_MASK 0x100

0 commit comments

Comments
 (0)
0