summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-03-14 04:32:50 (GMT)
committerGuido van Rossum <guido@python.org>1997-03-14 04:32:50 (GMT)
commit45b83915f8d5974045d374c981531d9b98570df1 (patch)
treef7212bc9be87ae8c5464633e0701cbf9a2f15b15 /Objects/floatobject.c
parent1aeb1047baa41af14e720f74f30d288417f1122e (diff)
downloadcpython-45b83915f8d5974045d374c981531d9b98570df1.zip
cpython-45b83915f8d5974045d374c981531d9b98570df1.tar.gz
cpython-45b83915f8d5974045d374c981531d9b98570df1.tar.bz2
New form of PyFPE_END_PROTECT macro.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index e8d0d68..72b68a9 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -260,7 +260,7 @@ float_add(v, w)
double result;
PyFPE_START_PROTECT("add", return 0)
result = v->ob_fval + w->ob_fval;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(result)
return newfloatobject(result);
}
@@ -272,7 +272,7 @@ float_sub(v, w)
double result;
PyFPE_START_PROTECT("subtract", return 0)
result = v->ob_fval - w->ob_fval;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(result)
return newfloatobject(result);
}
@@ -285,7 +285,7 @@ float_mul(v, w)
PyFPE_START_PROTECT("multiply", return 0)
result = v->ob_fval * w->ob_fval;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(result)
return newfloatobject(result);
}
@@ -301,7 +301,7 @@ float_div(v, w)
}
PyFPE_START_PROTECT("divide", return 0)
result = v->ob_fval / w->ob_fval;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(result)
return newfloatobject(result);
}
@@ -325,7 +325,7 @@ float_rem(v, w)
mod += wx;
/* div -= 1.0; */
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(mod)
return newfloatobject(mod);
}
@@ -349,7 +349,7 @@ float_divmod(v, w)
mod += wx;
div -= 1.0;
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(div)
return mkvalue("(dd)", div, mod);
}
@@ -394,7 +394,7 @@ float_pow(v, w, z)
if (ix!=0 && z->ob_fval<0) ix+=z->ob_fval;
}
else ix=1.0;
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(ix)
return newfloatobject(ix);
}
errno = 0;
@@ -403,7 +403,7 @@ float_pow(v, w, z)
ix = powu(iv, intw);
else
ix = 1./powu(iv, -intw);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(ix)
}
else {
/* Sort out special cases here instead of relying on pow() */
@@ -423,7 +423,7 @@ float_pow(v, w, z)
errno = 0;
PyFPE_START_PROTECT("pow", return 0)
ix = pow(iv, iw);
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(ix)
}
CHECK(ix);
if (errno != 0) {
@@ -438,7 +438,7 @@ float_pow(v, w, z)
((iv<0 && z->ob_fval>0) || (iv>0 && z->ob_fval<0) )) {
ix+=z->ob_fval;
}
- PyFPE_END_PROTECT
+ PyFPE_END_PROTECT(ix)
}
return newfloatobject(ix);
}