diff options
author | Guido van Rossum <guido@python.org> | 1992-03-27 17:28:44 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-27 17:28:44 (GMT) |
commit | 3132a5a7dc33c904227b2aef5e8227ac8b9ac867 (patch) | |
tree | 34fa90f20867b9d787515c893530c468857ffb2e /Objects | |
parent | f1aeab7f81de3932b20a0f9fe44c5a40cb1adbff (diff) | |
download | cpython-3132a5a7dc33c904227b2aef5e8227ac8b9ac867.zip cpython-3132a5a7dc33c904227b2aef5e8227ac8b9ac867.tar.gz cpython-3132a5a7dc33c904227b2aef5e8227ac8b9ac867.tar.bz2 |
answer lint's complaints
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/floatobject.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 7af5cd1..dba6681 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -64,6 +64,13 @@ newfloatobject(fval) return (object *) op; } +void +float_dealloc(op) + object *op; +{ + DEL(op); +} + double getfloatvalue(op) object *op; @@ -106,11 +113,12 @@ float_buf_repr(buf, v) } } +/* ARGSUSED */ static int float_print(v, fp, flags) floatobject *v; FILE *fp; - int flags; + int flags; /* Not used but required by interface */ { char buf[100]; float_buf_repr(buf, v); @@ -178,7 +186,7 @@ float_rem(v, w) floatobject *w; { double vx, wx; - double div, mod; + double /* div, */ mod; wx = w->ob_fval; if (wx == 0.0) { err_setstr(ZeroDivisionError, "float modulo"); @@ -186,10 +194,10 @@ float_rem(v, w) } vx = v->ob_fval; mod = fmod(vx, wx); - div = (vx - mod) / wx; + /* div = (vx - mod) / wx; */ if (wx*mod < 0) { mod += wx; - div -= 1.0; + /* div -= 1.0; */ } return newfloatobject(mod); } @@ -317,7 +325,7 @@ typeobject Floattype = { "float", sizeof(floatobject), 0, - free, /*tp_dealloc*/ + float_dealloc, /*tp_dealloc*/ float_print, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ |