summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-07 19:51:00 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-07 19:51:00 (GMT)
commit04dbf3b5ec618956c9df58ce1d6e3dc089f5f095 (patch)
tree034a834eb78fe400f52aeaa3eb2cd663e7a78ccd /Objects/floatobject.c
parentd474ce8c7a46edb5ab12c616cd307ab34699a816 (diff)
downloadcpython-04dbf3b5ec618956c9df58ce1d6e3dc089f5f095.zip
cpython-04dbf3b5ec618956c9df58ce1d6e3dc089f5f095.tar.gz
cpython-04dbf3b5ec618956c9df58ce1d6e3dc089f5f095.tar.bz2
Kill all uses and definitions of tp_print under Objects/. (Others will follow.)
Finally kill intobject.c, which was #ifdef'ed out a long time ago.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index bf65541..4260f50 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -205,7 +205,7 @@ format_double(char *buf, size_t buflen, double ob_fval, int precision)
{
register char *cp;
char format[32];
- /* Subroutine for float_repr, float_str, float_print and others.
+ /* Subroutine for float_repr, float_str, and others.
We want float numbers to be recognizable as such,
i.e., they should contain a decimal point or an exponent.
However, %g may print the number as an integer;
@@ -286,17 +286,6 @@ convert_to_double(PyObject **v, double *dbl)
#define PREC_REPR 17
#define PREC_STR 12
-/* ARGSUSED */
-static int
-float_print(PyFloatObject *v, FILE *fp, int flags)
-{
- char buf[100];
- format_float(buf, sizeof(buf), v,
- (flags & Py_PRINT_RAW) ? PREC_STR : PREC_REPR);
- fputs(buf, fp);
- return 0;
-}
-
static PyObject *
float_repr(PyFloatObject *v)
{
@@ -1058,7 +1047,7 @@ PyTypeObject PyFloat_Type = {
sizeof(PyFloatObject),
0,
(destructor)float_dealloc, /* tp_dealloc */
- (printfunc)float_print, /* tp_print */
+ 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */