summaryrefslogtreecommitdiffstats
path: root/Objects/frameobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-06-04 21:14:37 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-06-04 21:14:37 (GMT)
commit640c35ce135d71c6aafa13bb5985150f680416cc (patch)
treebec20a433c21cf6099478fdc91ea116934c21460 /Objects/frameobject.c
parente0b99ba140f83551cdeecb2a4ca9817aedde7ff5 (diff)
downloadcpython-640c35ce135d71c6aafa13bb5985150f680416cc.zip
cpython-640c35ce135d71c6aafa13bb5985150f680416cc.tar.gz
cpython-640c35ce135d71c6aafa13bb5985150f680416cc.tar.bz2
Reuse Py_MIN and Py_MAX macros: remove duplicate MIN/MAX macros
multiprocessing.h: remove unused MIN and MAX macros
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r--Objects/frameobject.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 6fff370..d3b59f1 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -7,11 +7,6 @@
#include "opcode.h"
#include "structmember.h"
-#undef MIN
-#undef MAX
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
#define OFF(x) offsetof(PyFrameObject, x)
static PyMemberDef frame_memberlist[] = {
@@ -160,8 +155,8 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
/* We're now ready to look at the bytecode. */
PyBytes_AsStringAndSize(f->f_code->co_code, (char **)&code, &code_len);
- min_addr = MIN(new_lasti, f->f_lasti);
- max_addr = MAX(new_lasti, f->f_lasti);
+ min_addr = Py_MIN(new_lasti, f->f_lasti);
+ max_addr = Py_MAX(new_lasti, f->f_lasti);
/* You can't jump onto a line with an 'except' statement on it -
* they expect to have an exception on the top of the stack, which
@@ -293,7 +288,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
break;
}
- min_delta_iblock = MIN(min_delta_iblock, delta_iblock);
+ min_delta_iblock = Py_MIN(min_delta_iblock, delta_iblock);
if (op >= HAVE_ARGUMENT) {
addr += 2;