diff Objects/floatobject.c @ 42477:e7fd327e0c19

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.
author Guido van Rossum <guido@python.org>
date Tue, 07 Aug 2007 19:51:00 +0000
parents d3a5c796c8ba
children e781085ac989
line wrap: on
line diff
--- a/Objects/floatobject.c	Tue Aug 07 19:42:11 2007 +0000
+++ b/Objects/floatobject.c	Tue Aug 07 19:51:00 2007 +0000
@@ -205,7 +205,7 @@
 {
 	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 @@
 #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 @@
 	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 */