diff Objects/floatobject.c @ 37589:aeee85b6a5dd legacy-trunk

More C++-compliance. Note especially listobject.c - to get C++ to accept the PyTypeObject structures, I had to make prototypes for the functions, and move the structure definition ahead of the functions. I'd dearly like a better way to do this - to change this would make for a massive set of changes to the codebase. There's still some warnings - this is purely to get rid of errors first.
author Anthony Baxter <anthonybaxter@gmail.com>
date Tue, 11 Apr 2006 06:54:30 +0000
parents 79a0f080f898
children 20cb13bdf1f0
line wrap: on
line diff
--- a/Objects/floatobject.c	Tue Apr 11 06:47:43 2006 +0000
+++ b/Objects/floatobject.c	Tue Apr 11 06:54:30 2006 +0000
@@ -959,21 +959,21 @@
 static PyObject *
 float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-	PyObject *tmp, *new;
+	PyObject *tmp, *newobj;
 
 	assert(PyType_IsSubtype(type, &PyFloat_Type));
 	tmp = float_new(&PyFloat_Type, args, kwds);
 	if (tmp == NULL)
 		return NULL;
 	assert(PyFloat_CheckExact(tmp));
-	new = type->tp_alloc(type, 0);
-	if (new == NULL) {
+	newobj = type->tp_alloc(type, 0);
+	if (newobj == NULL) {
 		Py_DECREF(tmp);
 		return NULL;
 	}
-	((PyFloatObject *)new)->ob_fval = ((PyFloatObject *)tmp)->ob_fval;
+	((PyFloatObject *)newobj)->ob_fval = ((PyFloatObject *)tmp)->ob_fval;
 	Py_DECREF(tmp);
-	return new;
+	return newobj;
 }
 
 static PyObject *