Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93468ea

Browse files
committed
Remove unused macros in .c files
1 parent bdcb941 commit 93468ea

4 files changed

Lines changed: 0 additions & 12 deletions

File tree

Objects/funcobject.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ PyFunction_SetClosure(PyObject *op, PyObject *closure)
156156

157157
#define OFF(x) offsetof(PyFunctionObject, x)
158158

159-
#define RR ()
160-
161159
static PyMemberDef func_memberlist[] = {
162160
{"func_closure", T_OBJECT, OFF(func_closure),
163161
RESTRICTED|READONLY},

Objects/object.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,6 @@ default_3way_compare(PyObject *v, PyObject *w)
704704
Py_uintptr_t)(w->ob_type)) ? -1 : 1;
705705
}
706706

707-
#define CHECK_TYPES(o) PyType_HasFeature((o)->ob_type, Py_TPFLAGS_CHECKTYPES)
708-
709707
/* Do a 3-way comparison, by hook or by crook. Return:
710708
-2 for an exception (but see below);
711709
-1 if v < w;

Python/ceval.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3804,9 +3804,6 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
38043804
return result;
38053805
}
38063806

3807-
#define SLICE_ERROR_MSG \
3808-
"standard sequence type does not support step size other than one"
3809-
38103807
/* Extract a slice index from a PyInt or PyLong, and store in *pi.
38113808
Silently reduce values larger than INT_MAX to INT_MAX, and silently
38123809
boost values less than -INT_MAX to 0. Return 0 on error, 1 on success.

Python/compile.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ int Py_OptimizeFlag = 0;
5151
#define DUPLICATE_ARGUMENT \
5252
"duplicate argument '%s' in function definition"
5353

54-
#define ILLEGAL_DYNAMIC_SCOPE \
55-
"%.100s: exec or 'import *' makes names ambiguous in nested scope"
56-
5754
#define GLOBAL_AFTER_ASSIGN \
5855
"name '%.400s' is assigned to before global declaration"
5956

@@ -845,8 +842,6 @@ dump(node *n, int pad, int depth)
845842
dump(CHILD(n, i), pad + 1, depth);
846843
}
847844

848-
#define DUMP(N) dump(N, 0, -1)
849-
850845
static int
851846
com_init(struct compiling *c, const char *filename)
852847
{

0 commit comments

Comments
 (0)