diff options
author | Guido van Rossum <guido@python.org> | 1998-12-04 18:51:36 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-04 18:51:36 (GMT) |
commit | cf183acf15f7486978c2f37ad5864b50b7aafda2 (patch) | |
tree | 9fd64d356a468658c7831ab8d400d90f3dafce6d /Python | |
parent | d5516bc45fdd55b920838806e59a3089ac17ca93 (diff) | |
download | cpython-cf183acf15f7486978c2f37ad5864b50b7aafda2.zip cpython-cf183acf15f7486978c2f37ad5864b50b7aafda2.tar.gz cpython-cf183acf15f7486978c2f37ad5864b50b7aafda2.tar.bz2 |
Use PyInt_AS_LONG macro instead of explicit inlining.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index bcc2288..3625473 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -799,8 +799,8 @@ eval_code2(co, globals, locals, if (PyInt_Check(v) && PyInt_Check(w)) { /* INLINE: int + int */ register long a, b, i; - a = ((PyIntObject*) v)->ob_ival; - b = ((PyIntObject*) w)->ob_ival; + a = PyInt_AS_LONG(v); + b = PyInt_AS_LONG(w); i = a + b; if ((i^a) < 0 && (i^b) < 0) { PyErr_SetString(PyExc_OverflowError, @@ -824,8 +824,8 @@ eval_code2(co, globals, locals, if (PyInt_Check(v) && PyInt_Check(w)) { /* INLINE: int - int */ register long a, b, i; - a = ((PyIntObject*) v)->ob_ival; - b = ((PyIntObject*) w)->ob_ival; + a = PyInt_AS_LONG(v); + b = PyInt_AS_LONG(w); i = a - b; if ((i^a) < 0 && (i^~b) < 0) { PyErr_SetString(PyExc_OverflowError, @@ -1390,8 +1390,8 @@ eval_code2(co, globals, locals, /* INLINE: cmp(int, int) */ register long a, b; register int res; - a = ((PyIntObject*) v)->ob_ival; - b = ((PyIntObject*) w)->ob_ival; + a = PyInt_AS_LONG(v); + b = PyInt_AS_LONG(w); switch (oparg) { case LT: res = a < b; break; case LE: res = a <= b; break; |