diff Include/floatobject.h @ 2129:05360cd616ae legacy-trunk

The great renaming, phase two: all header files have been updated to use the new names exclusively, and the linker will see the new names. Files that import "Python.h" also only see the new names. Files that import "allobjects.h" will continue to be able to use the old names, due to the inclusion (in allobjects.h) of "rename2.h".
author Guido van Rossum <guido@python.org>
date Thu, 12 Jan 1995 11:45:45 +0000
parents 508036dbba3b
children fa98dda07877
line wrap: on
line diff
--- a/Include/floatobject.h	Thu Jan 12 11:37:57 1995 +0000
+++ b/Include/floatobject.h	Thu Jan 12 11:45:45 1995 +0000
@@ -31,23 +31,23 @@
 /* Float object interface */
 
 /*
-floatobject represents a (double precision) floating point number.
+PyFloatObject represents a (double precision) floating point number.
 */
 
 typedef struct {
-	OB_HEAD
+	PyObject_HEAD
 	double ob_fval;
-} floatobject;
+} PyFloatObject;
 
-extern DL_IMPORT typeobject Floattype;
+extern DL_IMPORT PyTypeObject PyFloat_Type;
 
-#define is_floatobject(op) ((op)->ob_type == &Floattype)
+#define PyFloat_Check(op) ((op)->ob_type == &PyFloat_Type)
 
-extern object *newfloatobject PROTO((double));
-extern double getfloatvalue PROTO((object *));
+extern PyObject *PyFloat_FromDouble Py_PROTO((double));
+extern double PyFloat_AsDouble Py_PROTO((PyObject *));
 
 /* Macro, trading safety for speed */
-#define GETFLOATVALUE(op) ((op)->ob_fval)
+#define PyFloat_AS_DOUBLE(op) ((op)->ob_fval)
 
 #ifdef __cplusplus
 }